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

Why do we use bufferedreader?

0 Answers  


Why java is not 100% object-oriented?

1 Answers  


What are parsers? Dom vs sax parser.

0 Answers  


Can an interface extend a class?

0 Answers  


What function extracts specified characters from a string?

0 Answers  






How do you write methodology?

0 Answers  


Write a program to calculate factorial in java?

0 Answers  


What does method mean?

0 Answers  


write a program to create an vector with string(add,remove) operation.and value should be enter through keyboard.

0 Answers   Axcend,


What is access modifiers?

1 Answers   Cap Gemini,


Can we declare a class as static?

0 Answers  


How to store image in arraylist in java?

0 Answers  


Categories