Search Suggest

Core Java - Interview Questions and Answers

Thia Articles Tutorials Interview Questions & Answers & Sample Chapters Technical Discussions.

1. What is JAVA ?

Java is a pure object oriented programming language, which has derived C syntax and C++ object oriented programming features.
Is a compiled and interpreted language and is platform independent and
Can do graphics, networking, multithreading. It was initially called as OAK.

2. What r the four cornerstones of OOP ?

Abstraction : Can manage complexity through abstraction. Gives the complete overview of a particular task and the details are handled by its derived classes. Ex : Car.
Encapsulation : Nothing but data hiding, like the variables declared under private of a particular class are accessed only in that class and cannot access in any other the class.
Inheritance : Is the process in which one object acquires the properties of another object, ie., derived object.
Polymorphism : One method different forms, ie., method overriding and interfaces are the examples of polymorphism.

3. What are Java Buzzwords ?

Simple : Easy to learn.
Secure : Provided by firewalls between networked applications.
Portable : Can be dynamically downloaded at various platforms connect to internet.
OOP : Four Corner stones.
Multithread : Can perform more than one task concurrently in a single program.
Robust : overcomes problems of de-allocation of memory and exceptions.
Interpreted : Convert into byte code and the executes by JVM.
Distributed : Concept of RMI.
Dynamic : Verifying and accessing objects at run time.

4. What is Java Interpreter ?

It is Java Virtual Machine. ie., a java program compiles the Unicode to intermediary code called as Bytecode which is not an executable code. that is executed by Java interpreter.

5. What is a unicode?

Unicode is a standard that supports International Characters.

6. What are types of Java applications?.

(i) Standalone applications(No browser).
(ii) Applets(Browser).

7. What is the difference between Procedural and OOPs?

A) In procedural program, programming logic follows certain procedures and the instructions are executed one after another. In OOPs program, unit of program is object, which is nothing but combination of data and code.

B) In procedural program,data is exposed to the whole program whereas in OOPs program,it is accessible within the object and which in turn assures the security of the code.

8.What are public static void main(String args[]) and System.out.println() ?

public static void main(String args[])
Public keyword is an access specifier.
Static allows main() to be called without having to instantiate a particular instance of class.
Void does not return any value.
main() is the method where java application begins.
String args[] receives any command line arguments during runtime.
System.out.println()
System is a predefined class that provides access to the system.
out is output stream connected to console.
println displays the output.

9. Define class ?

A class is a one which defines new datatype, and is template of an object, and is a protoype.

10. What is a JAR file?

Jar file allows to efficiently deploying a set of classes and their associated resources. The elements in a jar file are compressed, which makes downloading a Jar file much faster than separately downloading several uncompressed files.
The package java.util.zip contains classes that read and write jar files.






Đăng nhận xét