WorksheetsOOPS Live Quiz
Total questions: 28
Worksheet time: 14mins
Odd man out.
peek
element
top
We can create object for interface.
TRUE
FALSE
A class can implement interface having same method name but different return type.
Yes
No
Which of these class is superclass of String and StringBuffer class?
java.Lang
java.lang
java.util
ArrayList
Which of the following events are not there in java fx?
Mouse Event
Keyboard Event
Drag Event
None of these
Which package contains Date/Time?
java.timedate
java.util.time
java.time
java.util.calender
Match the following
octal (base 8) ---- 0b10010; (1)
hexadecimal (base 16) ---- 0x2F; (2)
binary (base 2) ---- 027; (3)
Octal - 3
Hexadecimal - 2
Binary - 1
Octal - 1
Hexadecimal - 3
Binary - 2
Octal - 3
Hexadecimal - 1
Binary - 2
Octal - 2
Hexadecimal - 3
Binary - 1
Which of these method of class String is used to extract a single character from a String object?
CHARAT()
charat()
charAt()
Charat()
A class can implement how many interfaces.
1
2
Many
100
Which of these method of class String is used to compare two String objects for their equality?
equals()
Equals()
isequal()
isEqual()
Byte stream class uses read and write methods
True
False
String buffer doesn't support
Modifiable
Immutable
Growable
Writeable
Any 4 inbuilt exception examples
I know the answer
I don't know the answer
interface Color{
void car();
}
interface Model{
void name();
}
class A7 implements Color,Model{
public void car(){
System.out.println("Car");
}
public void name(){
System.out.println("Name");
}
public static void main(String args[]){
A7 obj= __________
obj.car();
obj.name();
} }
How do create an object?
I know the answer
I don't know the answer
What are the 4 access modifier in JAVA?
I know the answer
I don't know the answer
Example of Hierarchical Inheritance.
I know the answer
I don't know the answer
Difference between 'Thread' and 'Runnable'
I know the answer
I don't know the answer
What is the difference between element() and peek() methods of queue?
I know the answer
I don't know the answer
Stack <Integer> stk=new Stack<>();
stk.push(7);
stk.push(8);
stk.push(11);
How will you find out the position of number '8' in stack?
I know the answer
I don't know the answer
What are the different ways to access the package?
I know the answer
I don't know the answer
How are ‘this’ keyword used in JAVA? (Any 2)
I know the answer
I don't know the answer
What are all the objects of print stream?
I know the answer
I don't know the answer
What are the two ways 'synchronized' keyword can be used in thread?
I know the answer
I don't know the answer
When you create an input stream, if the file does not exist, then which exception is thrown
I know the answer
I don't know the answer
Explain hasNext() method.
I know the answer
I don't know the answer
Name 3 classes provided by javafx.scene.layout Package
I know the answer
I don't know the answer
interface Drawable{
void draw();
}
class R implements Drawable{
public void draw(){
System.out.println("Rectangle");
} }
class C implements Drawable{
public void draw(){
System.out.println("Circle");
} }
class Test{
public static void main(String args[]){
Drawable d= ____________
d.draw();
} }
How will you create an object for class 'C'?
I know the answer
I don't know the answer
Type casting from smaller type to larger type can be converted automatically.
True/ False.
If true,specify the type of casting.
I know the answer
I don't know the answer
