April 6, 2019

Srikaanth

Capita Plc Frequently Asked Core Java Interview Questions

What Is The Preferred Size Of A Component?

The preferred size of a component is the minimum component size that will allow the component to display normally.

Can Java Object Be Locked Down For Exclusive Use By A Given Thread?

Yes. You can lock an object by putting it in a "synchronized" block. The locked object is inaccessible to any thread other than the one that explicitly claimed it.

Can Each Java Object Keep Track Of All The Threads That Want To Exclusively Access It?

Yes.

What Is The Purpose Of The Wait(), Notify() And Notifyall() Methods?

The wait(), notify(), and notifyAll() methods are used to provide an efficient way for threads to wait for a shared resource. When a thread executes an object's wait() method, it enters the waiting state. It only enters the ready state after another thread invokes the object's notify() or notifyAll() methods.

What Are The High-level Thread States?

The high-level thread states are ready, running, waiting and dead.

What Is The Collections Api?

The Collections API is a set of classes and interfaces that support operations on collections of objects.

What Is The List Interface?

The List interface provides support for ordered collections of objects.

How Many Bits Are Used To Represent Unicode, Ascii, Utf-16 And Utf-8 Characters?

Unicode requires 16 bits.
ASCII require 7 bits. Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits.
UTF-8 represents characters using 8, 16, and 18 bit patterns.
UTF-16 uses 16-bit and larger bit patterns.
Capita Plc Most Frequently Asked Core Java Interview Questions Answers
Capita Plc Most Frequently Asked Core Java Interview Questions Answers

What Is The Properties Class?

The properties class is a subclass of Hashtable that can be read from or written to a stream. It also provides the capability to specify a set of default values to be used.

What Is The Purpose Of The Runtime Class?

The purpose of the Runtime class is to provide access to the Java runtime system.

What Is The Purpose Of The Finally Clause Of A Try-catch-finally Statement?

The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.

What Is The Locale Class?

The Locale class is used to tailor program output to the conventions of a particular geographic, political or cultural region.

What Is A Protected Method?

A protected method is a method that can be accessed by any method in its package and inherited by any subclass of its class.

What Is A Static Method?

A static method is a method that belongs to the class rather than any object of the class and doesn't apply to an object or even require that any objects of the class have been instantiated.

What Is The Difference Between A Window And A Frame?

A frame is a resizable, movable window with title bar and close button. Usually it contains Panels. Its derived from a window and has a borderlayout by default.

A window is a Container and has BorderLayout by default. A window must have a parent Frame mentioned in the constructor.

What Are Peerless Components?

The peerless components are called light weight components.

What Is The Difference Between The Reader/writer Class Hierarchy And The Inputstream/outputstream Class Hierarchy?

The Reader/Writer class hierarchy is character-oriented and the InputStream/OutputStream class hierarchy is byte-oriented.

What Is The Difference Between Throw And Throws Keywords?

The throw keyword denotes a statement that causes an exception to be initiated. It takes the Exception object to be thrown as argument. The exception will be caught by an immediately encompassing try-catch construction or propagated further up the calling hierarchy. The throws keyword is a modifier of a method that designates that exceptions may come out of the method, either by virtue of the method throwing the exception itself or because it fails to catch such exceptions that a method it calls may throw.

Name Primitive Java Types?

The primitive Java types are byte, char, short, int, long, float, double and boolean.

How Can A Gui Component Handle Its Own Events?

A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener.

What Advantage Do Java's Layout Managers Provide Over Traditional Windowing Systems?

Java uses layout managers to layout components in a consistent manner across all windowing platforms. Since Java's layout managers aren't tied to absolute sizing and positioning, they are able to accommodate platform-specific differences among windowing systems.

What Are The Problems Faced By Java Programmers Who Don't Use Layout Managers?

Without layout managers, Java programmers are faced with determining how their GUI will be displayed across multiple windowing systems and finding a common sizing and positioning that will work within the constraints imposed by each windowing system.

What Is The Difference Between Static And Non-static Variables?

A static variable is associated with the class as a whole, rather than with specific instances of a class. Non-static variables take on unique values with each object instance.

What Is The Difference Between The Paint() And Repaint() Methods?

The paint() method supports painting via a Graphics object. The repaint() method is used to cause paint() to be invoked by the AWT painting thread.

What Is A Container In A Gui?

A Container contains and arranges other components (including other containers) through the use of layout managers, which use specific layout policies to determine where components should go as a function of the size of the container.

https://mytecbooks.blogspot.com/2019/04/capita-plc-frequently-asked-core-java.html
Subscribe to get more Posts :