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

What is floating data type?

1 Answers  


How the elements are organized in CardLayout?

5 Answers  


how to run servlet program between two computer through the internet ?

2 Answers   Kiran Prakashan, TCS,


How many bytes is a string in java?

1 Answers  


What is get () in java?

1 Answers  


what is difference between excute query ()and execute update ()?

6 Answers   Symphony,


I am unable to find or learn about print command. I have a graphical program in core java in applet but i want to give print command but i have coding for that so if anyone know about this plz mail me on avdhesh_chauhan007@yahoo.co.in

1 Answers  


how to transactions(Bank transactions) in business process in ejb?

1 Answers   Photon,


What are 5 boolean operators?

1 Answers  


What is protected in java?

1 Answers  


What is * argv?

1 Answers  


how to create daemon thread in java?

1 Answers  


Categories