Question No: 1 ( Marks: 1 ) - Please choose one
► paint( )
► repaint( )
► draw( )
► redraw( )
Question No: 2 ( Marks: 1 ) - Please choose one
► try block
► finally block
► catch block
► throws-clause
Question No: 3 ( Marks: 1 ) - Please choose one
► ObjectInputStream
► BufferedReader
► StringTokenizer
► None of these
Question No: 4 ( Marks: 1 ) - Please choose one
► A base type is needed, because Java needs to know how to allocate memory.
► No base type is needed, because Java will use the Object class as a base type.
► If a base type is not specified the code will not compile.
► No base type is needed because Vectors default to storing String objects.
Question No: 5 ( Marks: 1 ) - Please choose one
► readObject and writeObject
► Either readObject or writeObject, or both, depending upon the desired behavior
► No need to implement any method
► None of the given option
Question No: 6 ( Marks: 1 ) - Please choose one
► Read
► Write
► Read/Write
► None of these
Question No: 7 ( Marks: 1 ) - Please choose one
► Uni-directional
► Bi-directional
► Multi-directional
► None of these
Question No: 8 ( Marks: 1 ) - Please choose one
► A Canvas object
► A Graphics object
► An Image object
► A paint object
Question No: 9 ( Marks: 1 ) - Please choose one
g.setColor(Color.red.green.yellow.red);
g.drawLine(0, 0, 100,100);
g.drawLine(0, 0, 100,100);
► Red
► Green
► Yellow
► Black
Question No: 10 ( Marks: 1 ) - Please choose one
► DataBaseMetaData db = con.getMeataData();
► ResultSetMetaData rsmd = rs.getMetaData();
► ResultSetMetaData rsmd = rs.setMetaData();
► DataBaseMetaData db = con.setMeataData();
Question No: 11 ( Marks: 1 ) - Please choose one
► Single
► Double
► Triple
► Multiple
Question No: 12 ( Marks: 1 ) - Please choose one
► Can’t be
► Can be
► Must
► None of these
Question No: 13 ( Marks: 1 ) - Please choose one
► Compiler
► Protocol
► Tool
► Technique
Question No: 14 ( Marks: 1 ) - Please choose one
► The program does not compile
► The program compiles but does not run
► The program compiles and runs properly
► The program throws an exception on compile time
Question No: 15 ( Marks: 1 ) - Please choose one
► The program does not compile
► The program compiles but does not run
► The program compiles and runs properly
► The program throws an exception on compile time
Question No: 16 ( Marks: 1 ) - Please choose one
► Within the same class
► Within the sub-class
► Within the same package
► All of the above
Question No: 17 ( Marks: 1 )
Question No: 18 ( Marks: 1 )
Question No: 19 ( Marks: 2 )
Question No: 20 ( Marks: 3 )
Question No: 21 ( Marks: 5 )
Question No: 22 ( Marks: 10 )
My name is ali.
My roll no is -----
I am studying java.
Java is very easy.
You are required to write a code which will read this file and create a new file in which lines would be swapped in such a way that first line would be swapped with 2nd and 3rd with 4th and so on.
New file should look like:
My roll no is ---------.
My name is ali.
Java is very easy.
I am studying java.
(5 Marks file handling, 5 Marks swapping)
No comments:
Post a Comment