November 1, 2018

Sreekanth B

Intelenet Global Services Most Frequently Asked Core Java Interview Questions Answers

What Must A Class Do To Implement An Interface?

It must provide all of the methods in the interface and identify the interface in its implements clause.

What Is The Difference Between Preemptive Scheduling And Time Slicing?

Under preemptive scheduling, the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. Under time slicing, a task executes for a predefined slice of time and then reenters the pool of ready tasks. The scheduler then determines which task should execute next, based on priority and other factors.

What Restrictions Are Placed On The Location Of A Package Statement Within A Source Code File?

A package statement must appear as the first line in a source code file (excluding blank lines and comments).

What Are Wrapped Classes?

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

Is It Possible To Specify Multiple Jndi Names When Deploying An Ejb?

No. To achieve this you have to deploy your EJB multiple times each specifying a different JNDI name.
Intelenet Global Services Most Frequently Asked Core Java Interview Questions Answers
Intelenet Global Services Most Frequently Asked Core Java Interview Questions Answers

What Is Java And Their Uses?

Java is an object-programming language that was designed to be portable across multiple platforms and operating systems. Developed by Sun Microsystems, Java is modeled after the C++ programming language and includes special features that make it ideal for programs on the Internet. Still, you may be wondering why Java is suddenly receiving so much hype, and what possible improvements could have been made to this new language so as to push aside a well-established language such as C++.

First and foremost, Java makes it easy to put interactive graphics and other special effects on a World Wide Web page. As with any programming language, Java lets you write programs. Special Java programs, called applets, execute inside a Web page with a capacity matching that of any traditional program. Furthermore, when you run a Java applet, the remote server, Java transmits the applet to your browser across the Internet. So rather than going out to a computer store to buy software, Java applets let you download applications automatically when you need them.

What Is Hotjava?

Programmers often mention the name "HotJava" in the same breath as Java. Whereas Java is a programming language, HotJava was the first Web browser that could download and play (execute) Java applets. HotJava, created by Sun, is simply a browser, much like the Netscape Navigator or Microsoft's Internet Explorer.

Although HotJava was the first browser to support Java applets, many browsers now support or will soon support applets. Starting with Netscape Navigator 2.0, for example, you can play Java applets for many platforms (Windows 95, the Mac, and so on). Another distinguishing feature of HotJava is that unlike most browsers which are written in C/C++, the HotJava browser is written with the Java programming language.

How Can You Say Java Is Object Oriented?

Java is an object-oriented programming language which means you can use Java to develop your programs in terms of data and the methods (functions) that operate on the data. In Java, a class is a collection of the data and methods which describe an object with which your program works. Think of an object as a "thing," such as a graphics image, a dialog box, or a file.

Java applets can arrange classes in hierarchical fashion which means you can build new classes from existing classes, improving upon or extending the existing class's capabilities. Everything in Java, except for a few primitive types such as numbers, characters, and boolean (true and false) types, is an object. Java comes with an extensive set of classes that you can use in your programs. In fact, a Java applet itself is a Java class.

Why Java Is Platform Independent? Explain.

When you write and compile a Java applet, you end up with a platform-independent file called a bytecode. Like a standard program, a bytecode consists of ones and zeros. Unlike a standard program, however, the bytecode is not processor specific. In other words, the bytecode does not correspond to an Intel Pentium or a Motorola processor. Instead, after the server downloads the bytecode to your browser, special code within the browser reads and interprets the bytecode, in turn running the applet. To run the bytecode in this way, the interpreter translates the platform independent ones and zeros into ones and zeros your computer's processor understands. In other words, it maps the bytecode to ones and zeros that correspond to the current processor, such as a Pentium.

Each computer platform (Mac, Windows, and so on) can have its own Java interpreter. However, the bytecode file that the server downloads to each browser is identical. In this way, you use the same bytecode on a browser running on a Mac, a PC, or a Silicon Graphics workstation. The multi-platform bytecode file is just one aspect of Java's portability. Java's designers also took the extra effort to remove any platform dependence in the Java language. Thus, you will not find any hardware specific references in Java.

Subscribe to get more Posts :