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
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 |
When throws keyword is used?
How do you do descending order in java?
What is the arguement of main method?
What is the latest java version?
What is lastindexof in java?
Is an object null?
What is valid keyword in java?
What is computer compiler?
What is the difference between keyword and identifier?
What is the reason that multiple inheritance is not possible in java??
What is the alternate of 'Inheritance' ?
how can you retrive information from database by using hashmap/arraylist ,plz explain with example briefly?