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 |
Why char array is favored over string for the storage of passwords?
Suppose there is an array list [10,5,20,19,15,24].Print them in ascending & descending order in collection framework concept ???
What does the @override annotation do?
What is parameters example?
What is left shift and right shift?
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
Why hashmap is used in java?
What is string subsequence method?
Can u write constructor in abstract.If yes den when it will be invoked.
Why declare Main() inside the class in java ?
What is the basic concepts of OOPS?
What is java beans?