R

Ram Sharma • 193.86K Points
Coach

Q. What is a Loop in Java programming language?

  • (A) A Loop is a block of code that is executed repeatedly as long as a condition is satisfied.
  • (B) A Loop is a block of code that is executed only once if the condition is satisfied.
  • (C) A Loop is a block of code that is executed more than 2 times if the condition is satisfied.
  • (D) None

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.

Related MCQs on JAVA

Q. Which of these is an incorrect Statement?

Q. What will be the output of the following Java program? package pkg; class output { public static void main(String args[]) { StringBuffer s1 = new StringBuffer("Hello World"); s1.insert(6 , "Good "); System.out.println(s1); } } Note : Output.class file is not in directory pkg.

Q. What is the difference between servlets and applets? i. Servlets execute on Server; Applets execute on browser ii. Servlets have no GUI; Applet has GUI iii. Servlets creates static web pages; Applets creates dynamic web pages iv. Servlets can handle only a single request; Applet can handle multiple requests

Q. interface Base{ boolean m1 (); byte m2(short s); } which two code fragments will compile? 1. interface Base2 implements Base {} 2. abstract class Class2 extends Base { public boolean m1(){ return true; }} 3. abstract class Class2 implements Base {} 4. abstract class Class2 implements Base { public boolean m1(){ return (7 > 4); }} 5. abstract class Class2 implements Base { protected boolean m1(){ return (5 > 7) }}

Q. Which of these methods can be used to obtain the reference to the container that generated a ContainerEvent?

Q. What will be the result after compiling this code? class SuperClass{ public int doIt(String str, Integer... data)throws Exception{ String signature = "(String, Integer[])"; System.out.println(str + " " + signature); return 1; } } public class Test extends SuperClass{ public int doIt(String str, Integer... data){ String signature = "(String, Integer[])"; System.out.println("Overridden: " + str + " " +signature); return 0; } public static void main(String... args){ SuperClass sb = new Test(); sb.doIt("hello", 3); } }

Q. What is the value of the expression true || false in Java?

Q. What is the suffix used to convert an int literal to long literal in Java?

Q. What is the storage capacity of single cookie?

Q. What will be the output of the following Java program?

Learn All JAVA MCQs