Description : What is an abstract class?
Last Answer : A: An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.
Description : Name some function of Scanner class.
Last Answer : A: next(), nextInt(), hasNextInt() etc.
Description : Name some function of StringTokenizer class.
Last Answer : A: nextToken(), countToken(), hasMoreTokens() etc.
Description : What are wrapper class?
Last Answer : A wrapper class is a class which wraps (encloses) around a data type and gives it an object appearance. Wherever, the data type is required as an object, this object can be used.
Description : What is a class variable?
Last Answer : A: Instance variables having the keyword ‘static’ before it is a class variable. For every object there is just one copy of the variable made.
Description : Can a package be called as a class?
Last Answer : A: Yes, Package is actually a class present in java.lang package.
Description : State true of false. i) Public can only be assigned to class ii) Protected protects a statement iii) Protected method is never accessible outside the package iv) Friendly variable may be accessible outside class A) i- ... -false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true
Last Answer : C) i-false, ii-true, iii-false, iv-false
Description : Each method in a java class must have a unique name . A) Not necessary B) True C) False D) None of the above
Last Answer : A) Not necessary
Description : State true or false. i) Jpanel is a class included in awt package. ii) Anonymous classes are mostly used for event handling. iii) Names of anonymous classes must be unique iv) JOptionPane is an inner class A) i-false ... ) i-false, ii-true, iii-false, iv-false D) i-true, ii-false, iii-false, iv-true
Description : Using which keyword we can access value of the instance variables and class variables of that class inside the method of that class itself. A) super B) final C) this D) either super or this
Last Answer : C) this
Description : Data input is A) an abstract class defined in java.io B) a class we can use to read primitive data types C) an interface that defines methods to open files. D) an interface that defines methods to read primitive data types.
Last Answer : D) an interface that defines methods to read primitive data types.
Description : The concept of multiple inheritance is implemented in Java by A) extending two or more classes B) extending one class and implementing one or more interfaces C) implementing two or more interfaces D) both B and C
Last Answer : D) both B and C
Description : Which of the following methods belong to the string class? A) length( ) B) compare To ( ) C) equals ( ) D) All of them
Last Answer : D) All of them
Description : The class string belongs to ................... package. A) java.awt B) java.lang C) java.applet D) java.string
Last Answer : B) java.lang
Description : The class at the top of exception class hierarchy is .......................... A) ArithmeticException B) Throwable C) Class D) Exception
Last Answer : B) Throwable
Description : ...................... of a remotely accessible object must implement ................ A) all methods, RemoteException B) class, RemoteException C) class, RemoteInterface D) all methods, RemoteInterface
Last Answer : C) class, RemoteInterface
Description : State true or false for Java Program. i) Data members of an interface are by default final ii) An abstract class has implementations of all methods defined inside it. A) i-false, ii-false B) i-false, ii-true C) i-true, ii-false D) i-true, ii-true
Last Answer : C) i-true, ii-false
Description : State true or false for Java Program. i) All class variables are instance variables ii) All protected methods are friendly methods A) i-false, ii-false B) i-false, ii-true
Last Answer : B) i-false, ii-true
Description : The out object is an object encapsulated inside the ................. class, and represents the standard output device. A) standard B) local C) globlal D) system
Last Answer : D) system
Description : State true of false. i) AWT is an extended version of swing ii) Paint( ) of Applet class cannot be overridden A) i-false, ii-false B) i-false,ii-true C) i-true, ii-false D) i-true, ii-true
Last Answer : A) i-false, ii-false
Description : When a program class implements an interface, it must provide behavior for A) two methods defined in that interface B) any methods in a class C) only certain methods in that interface D) all methods defined in that interface
Last Answer : D) all methods defined in that interface
Description : All java classes are derived from A) java.lang.Class B) java.util.Name C) java.lang.Object D) java.awt.Window
Last Answer : D) java.awt.Window
Description : Native – protocol pure Java converts ……….. into the ………… used by DBMSs directly. A) JDBC calls, network protocol B) ODBC class, network protocol C) ODBC class, user call D) JDBC calls, user call
Last Answer : A) JDBC calls, network protocol
Description : Which is the root class of all AWT events A) java.awt.ActionEvent B) java.awt.AWTEvent C) java.awt.event.AWTEvent D) java.awt.event.Event
Last Answer : B) java.awt.AWTEvent
Description : …………. Is the process of creating new classes, called derived classes from existing classes called base class. A) Inheritance B) Encapsulation C) Polymorphism D) Overloading
Last Answer : A) Inheritance
Description : A ……………. takes a reference to an object of the same class as itself as an argument. A) Reference constructor B) Copy Constructor C) Self Constructor
Last Answer : B) Copy Constructor
Description : A ………………. Is a class whose instances themselves are classes. A) Subclass B) Abstract Class C) Meta Class D) Object Class
Last Answer : C) Meta Class
Description : Which of the following is/ are the characteristics of friend function. A) It is not in the scope of the class to which it has been declared as friend. B) It can invoke like a normal function without the help of any object. C) Usually, it has the objects as arguments. D) All of the above.
Last Answer : D) All of the above.
Description : State True or False. i) A satic function can have access to only other static members (functions or variables) declared in the same class. ii) A static member function can be called using the class name (instead of its objects) A) True, True B) True, False C) False, True D) False, False
Last Answer : B) True, False
Description : The major goal of inheritance in C++ is A) To facilitate the conversion of data types B) To help modular programming C) To facilitate the reusability of code D) To extend the capabilities of a class
Last Answer : D) To extend the capabilities of a class
Description : Which of the following keywords are used to control access to a class member? A) default B) break C) protected D) goto
Last Answer : C) protected
Description : Which of the following is true about the static member variable in C++. i) It is initialized to zero when the first object of its class is created. Other initialization is also permitted. ii) It is visible only within ... , ii-True B) ii-False, ii-True C) i-True, ii-False D) i-False, iii-False
Last Answer : B) ii-False, ii-True
Description : State true of false. i) We cannot make the function inline by defining a function outside the class. ii) A member function can be called by using its name inside another member function of the same class, this ... of member function. A) True, True B) True, False C) False, True D) False, False
Last Answer : C) False, True
Description : Which of the following cannot be passed to a function? A) Reference variable B) Arrays C) Class objects D) Header files
Last Answer : D) Header files
Description : When a function is defined inside a class, this function is called …………. A) Inside function B) Class function C) Inline function D) Interior function
Last Answer : C) Inline function
Description : …………… is a way to bind the data and its associated functions together which allows the data and functions to be hidden. A) Structure B) Class C) Enum D) Both A and B
Last Answer : B) Class
Description : C++ is an extension of C with a major addition of the class construct feature of …………….. A) Simula67 B) Simula57 C) Simula47 D) Simula87
Last Answer : A) Simula67
Description : Which of the following statement is true? i) An address with all bits 1 is interpreted as all networks or all hosts. ii) The class A network 128.0.0.0 is defined as the loopback network. A) i only B) ii only C) Both A and B D) None of the above
Last Answer : A) i only
Description : State the following statement is true or false. i) In class B addresses a total of more than 1 billion addresses can be formed. ii) Class E addresses are reserved for future or experimental use. A) True, False B) True, True C) False, True D) False, False
Last Answer : B) True, True
Description : .......... addresses are reserved for multicasting. A) Class B B) Class C C) Class D D) Class E
Last Answer : C) Class D
Description : .................. address use 7 bits for the and 24 bits for the portion of the IP address. A) Class A B) Class B C) Class C D) Class D
Last Answer : A) Class A
Description : In classful addressing, the IP address 190.255.254.254 belongs to (A) Class A (B) Class B (C) Class C (D) Class D
Last Answer : (B) Class B
Description : In IPV 4, the IP address 200.200.200.200 belongs to (A) Class A (B) Class B (C) Class C (D) Class D
Last Answer : (C) Class C
Description : Given the following statements : S1 : SLR uses follow information to guide reductions. In case of LR and LALR parsers, the look-aheads are associated with the items and they make use of the left context available to ... (C) S1 is correct and S2 is not correct. (D) S1 is correct and S2 is correct.
Last Answer : (D) S1 is correct and S2 is correct.
Description : In a classful addressing, first four bits in Class A IP address is (A) 1010 (B) 1100 (C) 1011 (D) 1110
Last Answer : Answer: A,B,C,D
Description : Which of the following differentiates between overloaded functions and overridden functions ? (A) Overloading is a dynamic or runtime binding and overridden is a static or compile time binding. ... function overloading, while redefining a function in a friend class is called function overriding.
Last Answer : (B) Overloading is a static or compile time binding and overriding is dynamic or runtime binding.
Description : Which of the following is not a member of class ? (A) Static function (B) Friend function (C) Const function (D) Virtual function
Last Answer : (B) Friend function