blob: d604b5e3fcd697ffc858e846bde226f1095347ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package Q1;
import java.util.ArrayList;
import java.util.Scanner;
public class ReversedSentence {
public static String change5thPosition(String s) {
return "";
}
public static String printChar2DArray(char[][] arr) {
return "";
}
public static String reverseByCharacter(String s) {
return "";
}
public static String reverseByWord(String s) {
return "";
}
public static String truncateSentence(String s) {
return "";
}
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
ArrayList<String> sentences = new ArrayList<String>();
for (int i = 0; i < 3; i++) {
System.out.print("Enter sentence: ");
String sentence = in.next();
sentences.add(sentence);
}
}
}
|