October 23, 2018

Sreekanth B

Samsung Electronics Most Frequently Asked Latest Advanced Java Interview Questions Answers

What Type Messaging Is Provided By Jms?

Both synchronous and asynchronous are provided by JMS.

What Are The Different Parts Of A Jms Message ?

A JMS message contains three parts. a header, an optional properties and an optional body.

What Is The Role Of The Jms Provider?

The JMS provider handles security of the messages, data conversion and the client triggering. The JMS provider specifies the level of encryption and the security level of the message, the best data type for the non-JMS client.

What Is The Difference Between Byte Message And Stream Message?

Bytes Message stores data in bytes. Thus the message is one contiguous stream of bytes. While the Stream Message maintains a boundary between the different data types stored because it also stores the type information along with the value of the primitive being stored. Bytes Message allows data to be read using any type. Thus even if your payload contains a long value, you can invoke a method to read a short and it will return you something. It will not give you a semantically correct data but the call will succeed in reading the first two bytes of data. This is strictly prohibited in the Stream Message. It maintains the type information of the data being stored and enforces strict conversion rules on the data being read.

What Is Byte Message ?

Byte Messages contains a Stream of uninterrupted bytes. Byte Message contains an array of primitive bytes in it's payload. Thus it can be used for transfer of data between two applications in their native format which may not be compatible with other Message types. It is also be useful where JMS is used purely as a transport between two systems and the message payload is opaque to the JMS client.
Samsung Electronics Most Frequently Asked Latest Advanced Java Interview Questions Answers
Samsung Electronics Most Frequently Asked Latest Advanced Java Interview Questions Answers

What Is Object Message ?

Object message contains a group of serializeable java object. So it allows exchange of Java objects between applications. sot both the applications must be Java applications.

Can An Unreachable Object Become Reachable Again?

An unreachable object may become reachable again. This can happen when the object's finalize() method is invoked and the object performs an operation which causes it to become accessible to reachable objects.

When Is An Object Subject To Garbage Collection?

An object is subject to garbage collection when it becomes unreachable to the program in which it is used.

What Method Must Be Implemented By All Threads?

All tasks must implement the run() method, whether they are a subclass of Thread or implement the Runnable interface.

What Methods Are Used To Get And Set The Text Label Displayed By A Button Object?

getLabel() and setLabel().

Which Component Subclass Is Used For Drawing And Painting?


What Are Synchronized Methods And Synchronized Statements?

Synchronized methods are methods that are used to control access to an object. A thread only executes a synchronized method after it has acquired the lock for the method's object or class.

Synchronized statements are similar to synchronized methods. A synchronized statement can only be executed after a thread has acquired the lock for the object or class referenced in the synchronized statement.

What Are The Two Basic Ways In Which Classes That Can Be Run As Threads May Be Defined?

A thread class may be declared as a subclass of Thread, or it may implement the Runnable interface.

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's Java Swing?

Swing is basscially a type of Toolkit which is GUI toolkit for Java. It is one part of the Java Foundation Classes (JFC). Swing includes graphical user interface (GUI) widgets such as text boxes, buttons, split-panes, and tables.
Swing widgets provide more sophisticated GUI components than the earlier Abstract Window Toolkit. Since they are written in pure Java, they run the same on all platforms, unlike the AWT which is tied to the underlying platform's windowing system. Swing supports pluggable look and feel � not by using the native platform's facilities, but by roughly emulating them. This means you can get any supported look and feel on any platform. The disadvantage of lightweight components is slower execution. The advantage is uniform behavior on all platforms.

What Is Jfc?

JFC stands for Java Foundation Classes. The Java Foundation Classes (JFC) are a set of Java class libraries provided as part of Java 2 Platform, Standard Edition (J2SE) to support building graphics user interface (GUI) and graphics functionality for client applications that will run on popular platforms such as Microsoft Windows, Linux, and Mac OSX

What Is Awt?

AWT is bassically stands for Abstract Window Toolkit. AWT enables programmers to develop Java applications with GUI components, such as windows, and buttons. The Java Virtual Machine (JVM) is responsible for translating the AWT calls into the appropriate calls to the host operating system.

What Are The Differences Between Swing And Awt?

Many diff are there

> AWT is heavy-weight components, but Swing is light-weight components.
> AWT is OS dependent because it uses native components, But Swing components are OS independent.
> We can change the look and feel in Swing which is not possible in AWT.
> Swing takes less memory compared to AWT.
> For drawing AWT uses screen rendering where Swing uses double buffering.

What Are Heavy Weight Components ?

A Heavyweight component is bassically associated with its own native screen resource which is generally known as a peer.

What Is Lightweight Component?

A Lightweight component is the bassically one that "borrows" the screen resource of an ancestor , which means it has no native resource of its own -- so it's "lighter".

What Is Double Buffering ?

Double buffering is bassically the process of use of two buffers rather than one to temporarily hold data being moved to and from an I/O device. Double buffering increases data transfer speed because one buffer can be filled while the other is being emptied.

What Is An Event In Swing?

Event is basscially as Changing the state of an object is called an event.

What Is An Event Handler In Swing?

An Event handler is bassically a part of a computer program created to tell the program how to act in response to a specific event.

Give Us The Name Of The List Layoutmanagers In Java?

List is here
> Flow Layout Manager
> Grid Layout Manager
> Box Layout Manager
> Border Layout Manager
> Card Layout Manager
> GridBag Layout Manager.

Subscribe to get more Posts :