It is perfectly legal to assign a subclass object to a supper class reference.
Correct Answer :
Download Objective type questions of
Visit our PDF store
Get all objective type questions of Java Programming MCQ
comments powered by Disqus.
Which of the following string can be used as mode string for creating a RandomAccessFile object?
A package is a collection of
EJBs can be of the following type(s)None of the above
Which of the following keywords are used to control access to a class member?
The default case is always required in the switch selection structure.
Message-Driven beans act as a listener for the Java Message Service API, processing messages synchronously
Which of the following statements are true?
Which of the following represent legal flow control statements?
A catch can have comma-separated multiple arguments.
When we invoke repaint () for a Component, the AWT invokes the method:
Which exception is thrown by the read() method of InputStream class?
The use of protected keyword to a member in a class will restrict its visibility as follows:
Which of the following methods can be used to change the size of a size() *resize()
Declaring a method synchronized guarantees that the deadlock cannot occur.
Submit button always fires doPost(...)
executeUpdate automatically updates data because___________
The programmer must explicitly create the system .in and system .out objects.
The name of a Java program file must match the name of the class with the extension Java.
Declarations can appear anywhere in the body of a Java method.
If a=10 and b= 15, then the statement x =(a>b)?a:b; assigns the value 15 to x.
Java is fully object oriented programme.
JSP files creates ________________
What does the following line of code do?TextField text=new TextField(10);
Consider the following statements: int x = 10, y = 15; x = ((x < y) ? (y + x) : (y - x); What will…
A method declared as static can not access non-static class members.
Servlet has ___________
In a single Servlet class we can use____________
executeUpdate(------------) returns ___________
Which of the following will produce a value of 10 if x = 9.7?
Join our Chat Group
Join our Twitter Group
Join our Pinterest Group
Join our Facebook Group
Subscribe to our Email Newsletter