July 4, 2021 Baibhav Computer No Comments 9 Created on July 04, 2021 By Baibhav Computer THEORY PRACTICE TEST PAPER1 1 / 15 What is a byte code? Check 2 / 15 2. State the differences between Syntax errors and Logical errors. Check 3 / 15 3. Write down the equivalent expression for the mathematical expressionq = 1 / √(a + b) + 3 / c2 Check 4 / 15 4. Explain the methods print() and println()? Check 5 / 15 5. What do you mean by coercion? Check 6 / 15 6. What is the difference between these two function Math.ceil() and Math.rint(), explain with example. Check 7 / 15 7. Explain two types of jump statement in java. Check 8 / 15 8. Find the output: String s="Year 2019";System.out.println(Character.isLetterOrDigit(s.charAt(5)));System.out.println(Character.isWhitespace(s.charAt(4)));System.out.println(Character.toLowerCase(s.charAt(3))); Check 9 / 15 9. Find the output: double x=12.35; int y=12;String s1=String.valueOf(x);String s2=Integer.toString(y);System.out.println(s1+s2); Check 10 / 15 10. Find the output: int a = 0;if(a>0 &&a<20)a++;else a--;System.out.println(a); Check 11 / 15 11. Rewrite the following using switch-case.char x; int m=0;if(x== ‘a’)m=m+1;if(x==’b’)m=m+2; Check 12 / 15 12. State the output of:for (int I = 1; i<=6; i++){System.out.println(i+ “ “);if(i%2==0)continue;System.out.println( i+ “ “); } Check 13 / 15 13. Rewrite the following using for loop:int i=1, f=1;do{f=f*I;i++;} while(i<=10);System.out.println(f); Check 14 / 15 14. Rewrite using if-else:comm = (sale> 15000)? Sale* 5/100:0; Check 15 / 15 15. Find the output:char ch = 'y';char chr = Character.toUpperCase(ch);int p = (int) chr;System.out.println(chr + "\t" + p); Check LinkedIn Facebook Twitter Restart Exam Previous Post Newer Post