Java Model Quessstions

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

Ans:- Both the Account class and the constructor must be defined as public.

Ans:- 32 bits

Ans:- catch block

Ans:- set CLASSPATH=%CLASSPATH%;c:\app\empDetails

Ans:- int num=3; switch(num){ case 3: System.out.println(case 3); continue; case 1: System.out.println(case 1); continue; case 2: System.out.println(case 2); continue; case 4: System.out.println(case 4); }

Ans:- The code will not compile.

Ans:- len and br should be defined as protected.

Ans:- 0.0D

Ans:-List<T> list = new ArrayList<T>();

Ans:- The method interest() should return a float type value.

Ans:-Mary needs to create the Financialinstitute superclass and the Bank subclass.

Ans:- Statement A is false and Statement B is true.

Ans:- The num1 variable.

Ans:- java.net.ServerSocket

Ans:- public class MyApplet extends JApplet implements Runnable

Ans:- Statement A is true and Statement B is false.

Ans:- Integer Class

Ans:-

Ans:-

Display derived Dislplay parent

Ans:-Hashset

Ans:-

Socket sc = new ServerSocket(); Sc.accept();

Ans:- FileOutputStream(String s, boolean b);

Ans:- void mouseEntered(MouseEvent me)

Ans:- ItemListener

Ans:- 2,1,4,3

Ans:- javac

Ans:-

Line 2 adds the value, abc to the list Line 3 will generate compile time error.

Ans:-

Inside static block Inside main method

You might also like