JAVA TEST PAPERS 0% Time Limit 20 minutes Maximum Allowed Time Is over Your Paper Successfully Sent. coding Java test Login Form to take test NameEmailPhone Number 1 / 24 int ++a = 100; System.out.println(++a); what is the output of the following programme? Compiler error 100 101 2 / 24 int a = 100; System.out.println(++a); what is the output of the following programme? 101 100 error 3 / 24 String str = “abcde”; System.out.println(str.substring(1, 3)); ab abc bc 4 / 24 Public class Solution{ Public static void main(String args[]){ Int i; for(i = 1; i < 6; i++){ if(i > 3) continue; } System.out.println(i); } } 6 4 3 5 / 24 Select the valid statement to declare and initialize an array. int[]A={} int[]A =(1,2,3) int[]A={1,2,3} 6 / 24 Public class Test{ Public static void main(String argos[]){ String str1 = “one”; String str2 = “two”; System.out.println(str1.concat(str2)); } } two onetwo one 7 / 24 What is the output of the following programme? int Integer = 24; char String = ‘I’; System.out.print(Integer); System.out.print(String); 24 I Error 24 I 8 / 24 if(FALSE){ System.out.print(“TRUE”); } else{ System.out.print(“FALSE”); } 1 error 9 / 24 Identify the return type of a method that does not return any value. Void double none 10 / 24 Int i = 0; do{ i++; System.out.println(i); } while(i < 10); upto which number i will be printed 10 9 11 / 24 public class Solution{ public static void main(String[] args){ int x = 10; x = x * 5; System.out.print(x); } } what is the output of the programme? 5 10 50 12 / 24 what range of index value you will specify to print the complete name : java coding (1,10) (1,11) (0,11) 13 / 24 public class Solution{ public static void main(String[] args){ int x = 127; x++; x++; System.out.print(x); } } 129 127 14 / 24 Exception created by try block is caught in which block throw none catch 15 / 24 What is the full form of OOPs Object oriented programming object original programming Original object programming 16 / 24 Identify the infinite loop both for(i = 1; i < 6; i--) for(i = 1; i < 6; i++) 17 / 24 Identify the output of the following program. String str = “Hellow”; System.out.println(str.indexOf(‘t)); error -1 18 / 24 Identify the output of the following program. String str = “Hellow”; System.out.println(str.indexOf(‘H)); error 1 19 / 24 Number of primitive data types in Java are? 4 8 6 20 / 24 int a = 100; System.out.println(a); int a =++a; what is the output of the following programme? 102 100 101 21 / 24 Public class Solution{ Public static void main(String args[]){ Int i; for(i = 1; i < 6; i++){ if(i > 3) break; } System.out.println(i); } } 6 4 3 22 / 24 if(1 + 1 + 1 + 1 + 1 == 5){ System.out.print(“TRUE”); } else{ System.out.print(“FALSE”); } Error 1 23 / 24 Identify the modifier which cannot be used for constructor. public static private 24 / 24 Int i = 0; do{ System.out.println(i); i++; } while(i < 10); upto which number i will be printed 9 10 Your score is LinkedIn Facebook Twitter VKontakte 0% Exit you can rate the paper on 1 to 5 scale 1 is least liked and 5 is most liked Send feedback