on master help sign in
Add Java file test
5fa1645Mithil Poojary
tests/syntax-tests/highlighted/Java/test.javanew file+39
@@ -0,0 +1,39 @@
1+import java.util.Scanner;
2+
3+/* This Java program was submiited to help bat
4+ * with its syntax highlighting tests
5+ */
6+
7+public class Main
8+{
9+ public static void main(String[] arg)
10+ {
11+ Scanner st = new Scanner(System.in);
12+ int t;
13+ t = st.nextInt();
14+ String tem;
15+ tem = st.nextLine();
16+ for(int zz=0;zz<t;zz++)
17+ {
18+ String str;
19+ str = st.nextLine();
20+ int n = str.length();
21+ char ch;
22+ for(int i=0;i<n;i++)
23+ {
24+ ch = str.charAt(i);
25+ if(ch=='a')
26+ System.out.print("n");
27+ else if(ch=='s')
28+ System.out.print("i");
29+ else
30+ System.out.print(ch);
31+ }
32+ System.out.println();
33+ }
34+ while(t!=0) {
35+ // Decrement t
36+ t -= 1;
37+ }
38+ }
39+}
tests/syntax-tests/source/Java/test.javanew file+39
@@ -0,0 +1,39 @@
1+import java.util.Scanner;
2+
3+/* This Java program was submiited to help bat
4+ * with its syntax highlighting tests
5+ */
6+
7+public class Main
8+{
9+ public static void main(String[] arg)
10+ {
11+ Scanner st = new Scanner(System.in);
12+ int t;
13+ t = st.nextInt();
14+ String tem;
15+ tem = st.nextLine();
16+ for(int zz=0;zz<t;zz++)
17+ {
18+ String str;
19+ str = st.nextLine();
20+ int n = str.length();
21+ char ch;
22+ for(int i=0;i<n;i++)
23+ {
24+ ch = str.charAt(i);
25+ if(ch=='a')
26+ System.out.print("n");
27+ else if(ch=='s')
28+ System.out.print("i");
29+ else
30+ System.out.print(ch);
31+ }
32+ System.out.println();
33+ }
34+ while(t!=0) {
35+ // Decrement t
36+ t -= 1;
37+ }
38+ }
39+}