November 4, 2018

Sreekanth B

Fiserv Most Frequently Asked Latest Core Java Interview Questions Answers

What Are Access Specifiers Available In Java?

Access specifiers are keywords that determine the type of access to the member of a class. These are

Public
Protected
Private
Defaults.

What Do You Understand By A Variable?

The variables play a very important role in computer programming. Variables enable programmers to write flexible programs. It is a memory location that has been named so that it can be easily be referred to in the program. The variable is used to hold the data and it can be changed during the course of the execution of the program.

What Do You Understand By Numeric Promotion?

The Numeric promotion is the conversion of a smaller numeric type to a larger numeric type, so that integer and floating-point operations may take place. In the numerical promotion process the byte, char and short values are converted to int values. The int values are also converted to long values, if necessary the long and float values are converted to double values, as required.

Differentiate Between A Class And An Object.

A Class is only the definition or prototype of real life object. Whereas an object is an instance or living representation of real life object. Every object belongs to a class and every class contains one or more related objects.
Fiserv Most Frequently Asked Latest Core Java Interview Questions Answers
Fiserv Most Frequently Asked Latest Core Java Interview Questions Answers

What Is The Use Of Object And Class Classes?

The Object class is the superclass of all other classes and it is highest-level class in the Java class hierarchy. Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions. The primitive Java types (boolean, byte, char, short, int, long, float and double) and the keyword void are also represented as Class objects.

What Do You Understand By Casting In Java Language?

The process of converting one datatype to another in Java language is called Casting.

What Are The Types Of Casting?

There are two types of casting in Java, these are Implicit casting and Explicit casting.

What Do You Understand By Downcasting?

The process of Downcasting refers to the casting from a general to a more specific type, i.e; casting down the hierarchy.

What Do You Understand By Final Value?

FINAL for a variable: value is constant.

FINAL for a method: cannot be overridden.

FINAL for a class: cannot be derived.

What Are Keyboard Events?

When Java generates a keyboard event, it passes an Event object that contains information about the key pressed, Java recognizes normal keys, modifier keys, and special keys, For normal keys, the event object contains the key's ASCII value. For the function, arrow and other special keys, there are no ASCII codes, so Java uses special Java-defined code. You have learned how to detect modifier keys. The modifier keys are stored in the modifiers variable in the Event object.

What Is The Intersection And Union Methods?

When your program uses Rectangle objects, you may need to determine the screen region that holds both objects or two Rectangle objects intersect, to find the intersection or the union of two rectangles, you can use the Rectangle class intersection and union methods. The intersection method returns the area where two Rectangle objects overlap. That is, the intersecting method return the area that two Rectangle objects have in common.

The union method, on the other hand, behaves differently than you might expect. The union method returns the smallest rectangle that encloses two Rectangle objects, instead of returning just the area covered by both objects. This illustrates the behavior of the intersection and union methods.

What Are Controls And Their Different Types In Awt?

Controls are components that allow a user to interact with your application and the AWT supports the following types of controls

Labels, Push Buttons, Check Boxes, Choice Lists, Lists, Scrollbars, Text Components.

These controls are the subclasses of the Component.

What Is The Difference Between Choice And List?

A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices and only one item may be selected from a choice. A List may be displayed in such a way that several list items are visible and it supports the selection of one or more list items.

What Is The Difference Between Scrollbar And Scrollpane?

A Scrollbar is a Component, but not a Container whereas Scrollpane is a Container and handles its own events and perform its own scrolling.

Which Containers Use A Flow Layout As Their Default Layout?

Panel and Applet classes use the FlowLayout as their default layout.

What Are Wrapper Classes?

Wrapper classes are classes that allow primitive types to be accessed as objects.

What Is The Difference Between Set And List?

Set stores elements in an unordered way but does not contain duplicate elements, where as list stores elements in an ordered way but may contain duplicate elements.

How Can The Checkbox Class Be Used To Create A Radio Button?

By associating Checkbox objects with a CheckboxGroup.

Which Textcomponent Method Is Used To Set A Textcomponent To The Read-only State?

setEditable().

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

getLabel() and setLabel().

What Is The Difference Between Yield() And Sleep()?

When a object invokes yield() it returns to ready state. But when an object invokes sleep() method enters to not ready state.

How To Handle A Web Browser Resize Operation?

You know how important it is to suspend your threads when Java calls an applet's stop method. Normally, Java calls the stop method when a browser leaves the corresponding Web page. However, in some cases, a Web browser will unexpectedly call an applet's stop method. When a browser window is resized, the browser may first call the stop method and then the start method. If you only stop a thread when its applet stops and create a new thread when the applet restarts, the applet will probably not behave the way that a user expects. To prevent unwanted behavior after resizing the browser, your program should suspend threads when the applet stops and resume the threads when the applet starts.

Explain The Concept Of Hashtables?

A hashtable is a data structure that lets you look up stored items using an associated key. With an array, you can quickly access an element by specifying an integer index. The limitation of an array is that the look up key can only be an integer. With a hashtable, on the other hand, you can associate an item with a key and then use the key to look up the item. You can use an object of any type as a key in a hashtable.

For example: you might specify the license-plate number as the key and use the key to look up the vehicle owner's record. To distinguish one item from the next, the associated key that you use must be unique for each item, as in the case of a vehicle's license plate number.

Subscribe to get more Posts :