Java Programming questions and answers with explanation for interview, download Java Programming quiz questions with answers as PDF files and eBooks. All students, freshers can download Core Java quiz questions with answers as PDF files and eBooks. Solved examples with detailed answer description. Core Java objective type questions with answers and explanation (MCQs) for job interview and placement tests. This Core Java online test is useful for.
|Language:||English, German, Arabic|
|ePub File Size:||18.73 MB|
|PDF File Size:||13.68 MB|
|Distribution:||Free* [*Sign up for free]|
Java Aptitude Questions in tranarkiptinan.ml for more Java Aptitude Questions to download in pdf format. i want java aptitude questions with answers. Posted by Arnab. CORE JAVA INTERVIEW. QUESTIONS AND ANSWERS. Table of Contents. 1) what are static blocks and static initalizers in Java?. Java Programming questions and answers with explanation for interview, competitive examination and entrance test. Fully solved examples with detailed.
It holds local variables and partial results, and plays a part in method invocation and return. Each thread has a private JVM stack, created at the same time as the thread.
Java Programming Interview Questions and Answers
A new frame is created each time a method is invoked. A frame is destroyed when its method invocation completes. Program Counter Register: PC program counter register contains the address of the Java virtual machine instruction currently being executed. Native Method Stack: It contains all the native methods used in the application.
More Details. JIT compiles parts of the bytecode that have similar functionality at the same time, and hence reduces the amount of time needed for compilation. A platform is the hardware or software environment in which a piece of software is executed.
There are two types of platforms, software-based and hardware-based. Java provides the software-based platform. There are the following differences between the Java platform and other platforms.
Java is the software-based platform whereas other platforms may be the hardware platforms or software-based platforms. Java is executed on the top of other hardware platforms whereas other platforms can only have the hardware components. The bytecode.
Java compiler converts the Java programs into the class file Byte Code which is the intermediate language between source code and machine code. This bytecode is not platform specific and can be executed on any computer. Classloader is a subsystem of JVM which is used to load class files. Whenever we run the java program, it is loaded first by the classloader. There are three built-in classloaders in Java.
Bootstrap ClassLoader: This is the first classloader which is the superclass of Extension classloader. It loads the rt. Extension ClassLoader: This is the child classloader of Bootstrap and parent classloader of System classloader.
It loads the class files from the classpath. By default, the classpath is set to the current directory. You can change the classpath using "-cp" or "-classpath" switch. It is also known as Application classloader.
Core Java - Interview Questions and Answers
Yes, Java allows to save our java file by. It is empty, but not null. The program compiles and runs correctly because the order of specifiers doesn't matter in Java.
The local variables are not initialized to any default value, neither primitives nor object references. In Java, access specifiers are the keywords which are used to define the access scope of the method, class, or a variable. Ans : The File class encapsulates the files and directories of the local file system.
The RandomAccessFile class provides the methods needed to directly access data contained in any part of a file. What class allows you to read objects directly from a stream?
Ans : The ObjectInputStream class supports the reading of objects from input streams.
What value does read return when it has reached the end of a file? What value does readLine return when it has reached the end of a file? Ans : The readLine method returns null when it has reached the end of a file. UTF-8 represents characters using 8, 16 and bit patterns.
UTF uses bit and larger bit patterns. Which of the following are true? The InputStream and OutputStream classes are byte-oriented. The Reader and Writer classes are character-oriented. The Reader and Writer classes are the preferred solution to serialized object output. Filters are supported on input, but not on output. Filters read from one stream and write to another. A filter may alter data that is read from one stream and written to another. Any Unicode character is represented using bits.
The syntax isClass. Struts 1 actions are a singleton. So all threads operate on the single action object and hence make it thread-unsafe. Struts 2 actions are not a singleton and a new action object copy are created each time a new action request is made and hence it threads safe.
Define an enumeration? Usually, we called enumeration as an enum.
An enumeration is an interface containing methods for accessing the original data structure from which the enumeration is obtained. It allows sequential access to all the elements stored in the collection. How can we find the actual size of an object on the heap? In Java, there is no way to find out the actual size of an object on the heap. Which API is provided by Java for operations on a set of objects? Java provides a Collection API which provides many useful methods which can be applied to a set of objects.
Why we used Vector class? The Vector class provides the ability to execute a growable array of objects. What is the difference between transient and volatile variable in Java? Transient: In Java, it is used to specify the variable is not being serialized. So, declare those variables as transient.
If the variable is confirmed as transient, then it will not be persisted. Transient keyword is used with that instance variable which will not participate in the serialization process. We cannot use static with a transient variable as they are part of the instance variable. The map interface is not compatible with the Collection interface. Because Map requires key as well as value, for example: if we want to add key-value pair so we will use put Object key , Object value.
There are two parameters required to add an element to HashMap object. In Collection interface add Object o has only one parameter. The other reasons are Map supports valueSet, keySet as well as other suitable methods which have just different views from the Collection interface. Mention the uses of Synchronized block We are using Synchronized block because It helps to lock an object for every shared resource. The scope of synchronized block is smaller than the method.
What are the functions of hashCode method? This method returns a hash code value an integer number.
And also returns the same integer number, if two keys by calling equals method are same. But in sometimes two hash code numbers can have different or same keys. What is the default size of load factor in hashing based collection?
Java Multiple Choice Questions and Answers
Custom tags can manipulate JSP content, but beans cannot. Composite operations can be reduced to a considerably simpler form with custom tags than with beans. Custom tags require reasonably a bit more work to set up than do beans.
Custom tags are available only in JSP 1. The expression language is used in JSP to simplify the accessibility of objects and It provides many objects that can be used directly like param, requestScope, sessionScope, applicationScope, request, session etc.
What are implicit objects?
Implicit objects, also called as pre-defined variables, are created by JSP Engine inside the service method so that it can be accessed directly without being declared explicitly. Define a cookie and what are the difference between session and cookie?
A cookie is a small piece of information, this piece of information sends to the browser by a web server. The browser stores the cookies for every Web server in a local file. In a future request or future reference, the browser sends all stored cookies for that detailed Web server.
The difference between cookies and sessions are: The session is working, regardless of the settings on the client browser. The client may have selected to disable cookies.
The session and cookies also differ in storing the amount of information. Instead of sending data as a packet, tunneling encrypts the data and encapsulates in a connection.The Serializable interface is used to identify objects that may be written to an output stream.
Repeatable annotation, Functional Interface annotation: It was introduced in Java SE 8, indicates that the type declaration is intended to be a functional interface, as defined by the Java Language Specification. Which of these standard collection classes implements a dynamic array? Input Output Streams Questions and Answers 5. Applets Questions and Answers 3. Strings Questions and Answers 2. Applets Questions and Answers 2.
Which of the following is correct way of implementing an interface salary by class manager?
- FAIREST CHANDA HAHN EPUB
- EL UNDECIMO MANDAMIENTO NO MATARAS TUS SUEOS PDF
- PARTITURAS GRATIS PARA BANDA SINALOENSE PDF DOWNLOAD
- THOMPSON AND THOMPSON GENETICS IN MEDICINE 7TH EDITION PDF
- HUMAN ANATOMY AND PHYSIOLOGY MARIEB 9TH EDITION PDF
- PDF FOR JAVA LANGUAGE
- HABLANDO SOLA PDF
- STUART MCGILL ULTIMATE BACK FITNESS AND PERFORMANCE EPUB