1) Find the Merge point of two linked lists.
2) Swap two bits of integer.
3) Reverse individual words of the sentence.
4) Reverse string without using temp string.

Answers were Sorted based on User's Feedback



1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual wo..

Answer / imran shaik

public class ReverseSentence {
public static void main(String[] args) {
System.out.println("please enter the Sentence");
Scanner input = new Scanner(System.in);
String s1 = input.nextLine();
String s[] = s1.split(" ");
String s3 = "";
int len = s.length;
for (int i = len - 1; i >= 0; i--) {
s3 = s3.concat(s[i]);
s3 = s3.concat(" ");
}
System.out.println(s3.trim());
}
}

Is This Answer Correct ?    5 Yes 2 No

1) Find the Merge point of two linked lists. 2) Swap two bits of integer. 3) Reverse individual wo..

Answer / santosh kumar

refer to net

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More Core Java Interview Questions

When throws keyword is used?

0 Answers  


How do you do descending order in java?

0 Answers  


What is the arguement of main method?

1 Answers  


What is the latest java version?

0 Answers  


What is lastindexof in java?

0 Answers  






Is an object null?

0 Answers  


What is valid keyword in java?

0 Answers  


What is computer compiler?

0 Answers  


What is the difference between keyword and identifier?

0 Answers  


What is the reason that multiple inheritance is not possible in java??

1 Answers  


What is the alternate of 'Inheritance' ?

4 Answers   CybAge, HCL,


how can you retrive information from database by using hashmap/arraylist ,plz explain with example briefly?

1 Answers   Satyam,


Categories