-
Q1 EasyWhat is the size of byte variable?ExplanationCorrect option: A) 8-bit
-
Q2 EasyWhat is the default value of float variable?ExplanationCorrect option: B) 0.0f
-
Q3 EasyWhich of the following is not a keyword in Java?ExplanationCorrect option: B) Boolean
-
Q4 EasyWhich method must be implemented by all threads?ExplanationCorrect option: A) run()
-
Q5 EasyWhat is the default value of Object variable?ExplanationCorrect option: A) null
-
Q6 EasyWhich of the following is a reserved keyword in Java?ExplanationCorrect option: B) strictfp
-
Q7 EasyWhich keyword is used for accessing the features of a package?ExplanationCorrect option: A) import
-
Q8 EasyWhich of these operators is used to allocate memory to array variables in Java?ExplanationCorrect option: C) new
-
Q9 EasyWhich of the following is not an OOPS concept in Java?ExplanationCorrect option: C) Compilation
-
Q10 EasyWhich of these cannot be used for a variable name in Java?ExplanationCorrect option: B) keyword
-
Q11 EasyWhich of these is returned by operator '&'?ExplanationCorrect option: B) Boolean
-
Q12 EasyWhich package contains the Random class?ExplanationCorrect option: A) java.util package
-
Q13 EasyWhat is the return type of the hashCode() method in the Object class?ExplanationCorrect option: B) int
-
Q14 EasyWhich of the following is a marker interface?ExplanationCorrect option: B) Remote
-
Q15 EasyWhich of these is used to make a class?ExplanationCorrect option: A) class
-
Q16 EasyWhat does the expression float a = 35 / 0 return?ExplanationCorrect option: C) Infinity
-
Q17 EasyWhich of the following tool is used to generate API documentation in HTML format from doc comments in source code?ExplanationCorrect option: C) Javadoc tool
-
Q18 EasyWhich of the following is a valid declaration of a char?ExplanationCorrect option: A) char ch = '\utea';
-
Q19 EasyWhich of the following is a valid long literal?ExplanationCorrect option: C) 0xnf029L
-
Q20 EasyWhat is the numerical range of a char?ExplanationCorrect option: D) 0 to 65535
-
Q21 EasyWhich of these methods is a part of the Java Collection class?ExplanationCorrect option: A) add()
-
Q22 EasyWhat does the expression 5.45 + "3.2" evaluate to?ExplanationCorrect option: B) "5.453.2"
-
Q23 EasyWhich of these data types is used by the Java compiler to represent internal object size?ExplanationCorrect option: B) int
-
Q24 EasyWhich of these keywords is used to make a class?ExplanationCorrect option: A) class
-
Q25 EasyWhat is the output of Math.floor(3.6)?ExplanationCorrect option: C) 3.0
-
Q26 EasyWhich of these is the correct way of making a string in Java?ExplanationCorrect option: D) String s = "Hello";
-
Q27 EasyWhich method is used to find the length of a string in Java?ExplanationCorrect option: C) length()
-
Q28 EasyWhat does the expression float a = 1 / 4 return?ExplanationCorrect option: B) 0
-
Q29 EasyWhich of these operators is used to allocate memory to an object?ExplanationCorrect option: C) new
-
Q30 EasyWhich of these is a valid constructor of class Integer?ExplanationCorrect option: C) Integer i = new Integer(5);
-
Q31 EasyWhich of these methods of class String is used to extract a substring from a String object?ExplanationCorrect option: C) substring()
-
Q32 EasyWhich of these is a method of class Object?ExplanationCorrect option: A) toString()
-
Q33 EasyWhich of these methods is used to compare two String objects for their equality?ExplanationCorrect option: A) equals()
-
Q34 EasyWhich of these keywords is used to define packages in Java?ExplanationCorrect option: C) package
-
Q35 EasyWhich of these methods of class String is used to obtain length of String object?ExplanationCorrect option: C) length()
-
Q36 EasyWhich of these methods of class String is used to extract more than one character at a time?ExplanationCorrect option: A) getChars()
-
Q37 EasyWhich of these is not a wrapper class?ExplanationCorrect option: D) String
-
Q38 EasyWhich of these classes is a subclass of wrapper class Number?ExplanationCorrect option: A) Byte
-
Q39 EasyWhich of these is a method of class Character?ExplanationCorrect option: D) All of the mentioned
-
Q40 EasyWhich of these methods of class Double is used to compare the value of two Double objects?ExplanationCorrect option: A) equals()
-
Q41 EasyWhich of these methods of class Integer is used to convert a string to a signed decimal integer?ExplanationCorrect option: B) parseInt()
-
Q42 EasyWhich of these methods is used to print stack trace?ExplanationCorrect option: C) printStackTrace()
-
Q43 EasyWhich of these methods is used to check for the EOF (End of File) in Java?ExplanationCorrect option: D) readLine()
-
Q44 EasyWhich of these methods is used to close a file in Java?ExplanationCorrect option: D) close()
-
Q45 EasyWhich of these is a method of PrintWriter class?ExplanationCorrect option: D) All of the mentioned
-
Q46 EasyWhich of these methods is a method of BufferedWriter class?ExplanationCorrect option: A) write()
-
Q47 EasyWhich of these classes is used to read from a file in Java?ExplanationCorrect option: A) FileInputStream
-
Q48 EasyWhich of these methods of InputStream class is used to read bytes from a file?ExplanationCorrect option: C) read()
-
Q49 EasyWhich of these is not a member class of Java's I/O system?ExplanationCorrect option: D) System.out
-
Q50 EasyWhich of these methods is used to flush the output stream?ExplanationCorrect option: A) flush()
-
Q51 EasyWhich of these is a member class of Java's I/O system?ExplanationCorrect option: D) All of the mentioned
-
Q52 EasyWhich of these methods is used to delete a file in Java?ExplanationCorrect option: B) delete()
-
Q53 EasyWhich of these methods is used to set the length of a file in Java?ExplanationCorrect option: A) setLength()
-
Q54 EasyWhich of these is a method of File class?ExplanationCorrect option: A) mkdir()
-
Q55 EasyWhich of these is used to read from a file?ExplanationCorrect option: A) FileReader
-
Q56 EasyWhich of these is used to write to a file?ExplanationCorrect option: B) FileWriter
-
Q57 EasyWhich of these classes is used to read from console?ExplanationCorrect option: B) Scanner
-
Q58 EasyWhich of these methods is used to read a character from console?ExplanationCorrect option: A) read()
-
Q59 EasyWhich of these methods is used to write a character to console?ExplanationCorrect option: B) write()
-
Q60 EasyWhich of these is used to print formatted output to console?ExplanationCorrect option: D) Both a) and b)
-
Q61 EasyWhich of these methods of Object class can clone an object?ExplanationCorrect option: A) clone()
-
Q62 EasyWhich of these methods of Object class can notify all waiting threads of an object?ExplanationCorrect option: C) notifyAll()
-
Q63 EasyWhich of these methods of Object class can wake up all waiting threads of an object?ExplanationCorrect option: B) notifyAll()
-
Q64 EasyWhich of these methods of Object class is used to create and start a new thread?ExplanationCorrect option: B) start()
-
Q65 EasyWhich of these methods of Object class can wake up a single thread that is waiting on the object's monitor?ExplanationCorrect option: A) notify()
-
Q66 EasyWhich of these methods is used to destroy an object created by constructor?ExplanationCorrect option: B) finalize()
-
Q67 EasyWhich of these methods is called to start a new thread?ExplanationCorrect option: B) start()
-
Q68 EasyWhich of these methods is called to release a lock on an object?ExplanationCorrect option: A) wait()
-
Q69 EasyWhich of these methods is used to suspend a thread for a period of time?ExplanationCorrect option: A) sleep()
-
Q70 EasyWhich of these methods is called when a thread is about to terminate?ExplanationCorrect option: D) finalize()
-
Q71 EasyWhich of these methods is called when a thread is in its running state?ExplanationCorrect option: C) run()
-
Q72 EasyWhich of these methods can be used to obtain a lock on an object?ExplanationCorrect option: D) synchronized()
-
Q73 EasyWhich of these methods can be used to release a lock on an object?ExplanationCorrect option: A) wait()
-
Q74 EasyWhich of these methods can be used to force a thread to start?ExplanationCorrect option: A) start()
-
Q75 EasyWhich of these methods can be used to terminate a thread?ExplanationCorrect option: A) stop()
-
Q76 EasyWhich of these methods can be used to suspend a thread?ExplanationCorrect option: C) suspend()
-
Q77 EasyWhich of these methods can be used to resume a suspended thread?ExplanationCorrect option: C) resume()
-
Q78 EasyWhich of these methods can be used to stop a running thread?ExplanationCorrect option: A) stop()
-
Q79 EasyWhich of these methods can be used to check if a thread is alive?ExplanationCorrect option: A) isAlive()
-
Q80 EasyWhich of these methods can be used to interrupt a thread?ExplanationCorrect option: A) interrupt()
-
Q81 EasyWhich of these methods can be used to yield the CPU to another thread?ExplanationCorrect option: A) yield()
-
Q82 EasyWhich of these methods can be used to create a thread?ExplanationCorrect option: D) new Thread()
-
Q83 EasyWhich of these methods can be used to start a thread?ExplanationCorrect option: B) start()
-
Q84 EasyWhich of these methods can be used to stop a thread?ExplanationCorrect option: A) stop()