These variables are inside a class however outside any method.
They come into existence when the class instantiates. |
Instance variables |
Its a good practice to use close() inside finally block. |
TRUE |
It is the most fundamental entity in Java or any other Object
Oriented Language. |
Object |
The capability of a method to do different things based on the
object that it is acting upon. In other words, it allows you define one
interface and have multiple implementations. |
Polymorphism |
A class can be made static only if it is _______________? |
Nested class |
Whenever there is multiple processes contending for exclusive
access to multiple locks, there is the possibility of deadlock. |
TRUE |
This is the least restrictive access modifier. Methods and
attributes that use the public modifier can be accessed within your current
class and by all other classes. |
Public |
It belong to the class instead of a specific instance, this
means you can access it without object. |
The correct answer is: |
It has the static keyword as a prefix in its declaration. Its
definition occurs only inside a class and outside any function. |
Class variables |
Feature of java that means, organizing our software as a
combination of different types of objects that incorporates both data and
behavior. |
Object-Oriented |
If you just want to achieve basic functionality of a thread
you can simply implement Runnable interface and override run() method. |
TRUE |
The JDK 1.0 was released on |
January 1996 |
It is where you handle the exceptions, this block must follow
the try block. |
Catch block |
An abstract class can be instantiated. |
FALSE |
A class can have multiple Static blocks, which will execute in
the same sequence in which they have been written into the program. |
TRUE |
The JDK 1.1 was released on |
February 1997 |
Facility to allow multiple activities within a single process. |
The correct answer is: |
A popular general-purpose programming language and computing
platform. It is fast, reliable, and secure. |
Java |
The class that extends the features of another class is known
as _____________? |
B and C |
It is common to all the instances (or objects) of the class
because it is a class level variable. |
Static variable |
It checks the code fragments for illegal code that can violate
access right to objects. |
Bytecode Verifier |
A class which is not abstract is referred as. |
Concrete class |
We can instantiate an interface in java. |
FALSE |
Interface provides full abstraction as none of its methods
have body. |
TRUE |
The JAVA SE 12 was released on |
March 2019 |
Variables that is constants. This variable cannot be change
once it is initialized. |
Final variable |
A final method cannot be overridden. |
TRUE |
Java is an Object-Oriented programming language developed by
______________ in the early 1990s |
James Gosling |
A final variable that is not initialized at the time of
declaration is known as _______________. |
Blank final variable |
A class derived from the abstract class must implement all
those methods that are declared as abstract in the parent class. |
TRUE |
It determines what resources a class can access such as
reading and writing to the local disk. |
Security Manager |
It is the on-disk part of Java that creates the JVM. |
JRE |
It is a lightweight Graphical User Interface (GUI) toolkit
that includes a rich set of widgets. It includes package lets you make GUI
components for your Java applications, and It is platform independent. |
Java swing |
If you declare an abstract method in a class then you don't
need to declare the class abstract as well. |
FALSE |
It is a fully functioning window with its title and icons. |
Frame |
All variables declared in an interface are by default final. |
TRUE |
Interface which is declared inside another interface or class. |
Nested interface |
The same method in child class which is already present in the
parent class. |
Method Overriding |
The following are the advantages of Inheritance except. |
Allows you to define one interface |
The class whose properties and functionalities are use
(inherited) by another class is known as _______________? |
Parent Class |
The thread ends when it comes when the run() method finishes
its execution. |
TRUE |
Making a member static can access it without object. |
TRUE |
Finally is a method that is called by JVM during garbage
collection. |
FALSE |
Classes that can have other components on it. |
Container classes |
Using threads increases the responsiveness of GUI
applications. |
TRUE |
We use thread to perform asynchronous or background processing |
TRUE |
An exception in the finally block, behaves exactly like any
other exception. |
TRUE |
The variables declared in an interface are public, static
& final by default. |
TRUE |
If no exception occurs in try block then the catch blocks are
completely ignored. |
TRUE |
An abstract class must be extended and in a same way abstract
method must be overridden. |
TRUE |
Use to define the visibility of classes, methods, and
attributes. |
Access Modifier |
It contains all the crucial statements that must be executed
whether exception occurs or not. |
Finally block |
Static variables are also known as ______________________? |
Class variables |
You can not have abstract method in a concrete class. |
TRUE |
The super keyword refers to the ______________, immediately
above of the calling class in the hierarchy. |
Super Class |
An interface can implement another interface |
FALSE |
An abstract class has no use until unless it is extended by
some other class. |
TRUE |
Local final variable must be initializing during declaration. |
TRUE |
Part of the Java Runtime Environment(JRE) which is used to
load Java classes into the Java Virtual Machine dynamically. |
Classloader |
The J2SE 5.0 was released on |
September 2004 |
This is the most restrictive and most commonly used access
modifier. If you use the this modifier with an attribute or method, it can
only be accessed within the same class. |
Private |
When a thread is invoked, there will be one path of execution. |
FALSE |
We can change the value of a final variable. |
FALSE |
It is a good practice to name final variable in all CAPS. |
TRUE |
It is a pure container and is not a window in itself. The sole
purpose of a it is to organize the components on to a window. |
Panel |
It is the default layout manager for every JPanel. It simply
lays out components in a single row one after the other. |
Java FlowLayout |
It can be thought of like a pop-up window that pops out when a
message has to be displayed. It is not a fully functioning window like the
Frame. |
Dialog |
finalize is used in . |
FALSE |
The J2SE 1.3 was released on |
May-00 |
If method parameters are declared final then the value of
these parameters cannot be changed. |
TRUE |
It can access class variables(static variables) without using
object(instance) of the class. |
Static methods |
Attributes and methods with the access modifier protected can
be accessed within your class, by all classes within the same package, and by
all subclasses within the same or other packages. |
Protected |
Nested interface are also known as? |
Inner interface |
It facilitates you to carry the Java bytecode to any platform. |
Portable |
If an exception occurs in try block then the control of
execution is passed to the corresponding catch block. |
TRUE |
Used to layout the GUI java components inside a container. |
Java Layout Manager |
A constructor can be declared as final. |
FALSE |
A class that is declared using abstract keyword. |
Abstract class |
The process by which one class acquires the properties (data
members) and functionalities(methods) of another class. |
Inheritance |
Allows developers to create Java programs that can be executed
and run by the JVM and JRE. |
JDK |
Java is a write once, runObject Oriented Programming anywhere
language. |
Object-Oriented |
The J2SE 1.4 was released on |
February 2002 |
It is a Java platform component that executes programs. |
JVM |
If a child does not implement all the abstract methods of
abstract parent class, then the child class must need to be declared abstract
as well. |
TRUE |
A final class can be inherited. |
FALSE |
Proper co-ordination is required between threads accessing
common variables. |
Risk factor |
It is used for initializing the static variables. |
Static Block |
A finally block must be associated without a try block. |
FALSE |
Places components in up to five areas: top, bottom, left,
right, and center. It is the default layout manager for every java JFrame. |
Java BorderLayout |
It is the more sophisticated of all layouts. It aligns
components by placing them within a grid of cells, allowing components to
span more than one cell. |
Java GridBagLayout |
The name Java originates from a sort of ____________ |
Expresso Bean |
The J2SE 1.2 was released on |
December 1998 |
The class that implements interface must implement all the
methods of that interface. |
TRUE |
Class that implements any interface must implement all the
methods of that interface, else the class should be declared abstract. |
FALSE |
It is a blueprint for objects to follow a specific schema
defined in the class. |
Class |
The superclass constructor can be called explicitly using the
____________________ ? |
Super Keyword |
Abstract method has no body. |
TRUE |
These are variables which have declarations inside methods,
constructors or blocks. |
Local variables |
One of the OOPs feature that allows us to perform a single
action in different ways. |
Polymorphism |
is built on top of the Java Abstract Widget Toolkit (AWT), an
older, platform dependent GUI toolkit. |
Java library |
Feature of java that is very easy to learn, and its syntax is
simple, clean and easy to understand. |
Simple |
Have methods and variables just like the class but the methods
declared in it are by default abstract. |
Interface |
Statement used to close all the open streams in a program. |
close() |
A set of processes or threads is said to be deadlocked when
each is waiting for an action that only one of the others can perform. |
TRUE |
Extending an interface can implement another interface. |
TRUE |
It contains set of statements where an exception can occur. |
Try block |
Sub class is invoked when we create the object of subclass, it
by default invokes the default constructor of super class. |
Constructor |
A try-finally block is not possible without catch block. |
FALSE |
No comments:
Post a Comment