Archive for java freshers questions

You are browsing the archives of java freshers questions.

What is JVM in java……….a brief description

Java Virtual Machine (JVM) It is the principal component of Java architecture that provides the cross platform functionality and security to Java. This is a software process that converts the compiled Java byte code to machine code. Byte code is an intermediary language between Java source and the host system. Most programming language like C […]

What is Java …… A brief description!!!!

What is Java? Java is a high-level object-oriented programming language developed by the Sun Microsystems. Though it is associated with the World Wide Web but it is older than the origin of Web. It was only developed keeping in mind the consumer electronics and communication equipments. It came into existence as a part of web […]

Java-Fundamental concepts through OOPS

Q) OOPS concepts Polymorphism Ability to take more than one form, In java we achieve this using Method Overloading (compile time polymorphism), Method overriding (runtime polymorphism) Inheritance Is the process by which one object acquires the properties of another object. Encapsulation Wrapping of data and function into a single unit called encapsulation. Ex:- all java […]

Java questions with one word answers

Q: What if the main method is declared as private? A: The program compiles properly but at runtime it will give “Main method not public.” message. Q: What if the static modifier is removed from the signature of the main method? A: Program compiles. But at runtime throws an error “NoSuchMethodError”. Q: What if I […]

Java- Technical question on Networking Concepts

1) The API doesn’t list any constructors for InetAddress- How do I create an InetAddress instance? ANSWER : In case of InetAddress the three methods getLocalHost, getByName, getByAllName can be used to create instances. E.g. InetAddress add1; InetAddress add2; try{ add1 = InetAddress.getByName(“java.sun.com”); add2 = InetAddress.getByName(“199.22.22.22”); }catch(UnknownHostException e){} 2) Is it possible to get the […]

Java-Programitical questions, logical questions,technical questions part-II

This paper gives an idea about Java programmatic questions and logicals that are being asked in interviews for freshers and experienced people. And also don’t forget to read another part of this series here, also check out complete Java section if you want to be master in Java Examine the following class definition: public class […]

Java-Programitical questions, logical questions,technical questions part-I

This paper gives an idea about java coding questions for freshers which are helpful for interview exams… What class must an inner class extend: 1) The top level class 2) The Object class 3) Any class or interface 4) It must extend an interface Answer 3 In the following code, which is the earliest statement, […]

Java- Technicl questions on AWT: CONTROLS, LAYOUT MANAGERS AND MENUS

What is meant by Controls and what are different types of controls? Ans : Controls are componenets that allow a user to interact with your application.The AWT supports the following types of controls: Labels Push buttons Check boxes Choice lists Lists Scroll bars Text components These controls are subclasses of Component. You want to construct […]

Java-Technical questions on EVENT HANDLING

The event delegation model, introduced in release 1.1 of the JDK, is fully compatible with the event model. True False Ans : b. A component subclass that has executed enableEvents( ) to enable processing of a certain kind of event cannot also use an adapter as a listener for the same kind of event. True […]

Java- J2ee interview questions part-II

101. What is form-based authentication An authentication mechanism in which a Web container provides an application-specific form for logging in. This form of authentication uses Base64 encoding and can expose user names and passwords unless all connections are over SSL. 102. What is general entity An entity that is referenced as part of an XML […]