QUESTION - What is byte code in the context of Java?
-The type of code generated by a Java compiler-The type of code generated by a Java Virtual Machine
-It is another name for a Java source file
-It is the code written within the instance methods of a class.
View Answer / Hide Answer
Core
Java interview test (72 questions)
-By Pradip Patil, Lecturer IIMP MCA
-By Pradip Patil, Lecturer IIMP MCA
Java (20
questions)
-By Pradip Patil, Lecturer IIMP MCA
-By Pradip Patil, Lecturer IIMP MCA
Java interview questions and answers for freshers
Advanced java interview questions - senior level java interview
QUESTION - What is garbage collection in the context of Java?
-The operating system periodically deletes all of the java files available on the system.-Any package imported in a program and not used is automatically deleted.
-When all references to an object are gone, the memory used by the object is automatically reclaimed.
-The JVM checks the output of any Java program and deletes anything that doesn't make sense.
View Answer / Hide Answer
Basic Java interview questions - Frequently asked Java interview
Core Java interview questions and answers for freshers
Core java interview questions and answers for experienced
QUESTION - What is different between a Java applet and a Java application?
-An application can in general be trusted whereas an applet can't.-An applet must be executed in a browser environment.
-An applet is not able to access the files of the computer it runs on
-All of the above
View Answer / Hide Answer
QUESTION - You read the following statement in a Java program that compiles and
executes.
submarine.dive(depth);
What can you say for sure?
-depth must be an int-dive must be a method.
-dive must be the name of an instance field.
-submarine must be the name of a class
View Answer / Hide Answer
QUESTION - Which is true about an anonymous inner class?
-It can extend exactly one class and implement exactly one interface.-It can extend exactly one class and can implement multiple interfaces.
-It can implement multiple interfaces regardless of whether it also extends a class.
View Answer / Hide Answer
QUESTION - If a thread is to be declared as a daemon thread, it must be declared before
-start method-run method
-stop method
-none
View Answer / Hide Answer
QUESTION - Under what circumstances might you use the yield method of the Thread class
-To call from the currently running thread to allow another thread of the same or higher priority to run-To call on a waiting thread to allow it to run
-To allow a thread of higher priority to run
-To call from the currently running thread with a parameter designating which thread should be allowed to run
View Answer / Hide Answer
QUESTION - Which of the following is the correct syntax for suggesting that the JVM performs garbage collection
-System.free();-System.setGarbageCollection();
-) System.out.gc();
-System.gc();
View Answer / Hide Answer
QUESTION - When method defined in subclass which has same signature as a method in a super class, it is known as method ________________
-Overloading-Overriding
-Packing
-none of these
View Answer / Hide Answer
QUESTION - In an AWT or Swing container, BoxLayout places the components in
which form?
1) left to right
2) top to bottom
3)right to left
4)bottom to top
-1
-2
-1 and 2
-3 and 4
View Answer / Hide Answer
QUESTION - A class that cannot be a subclass is called as______ class.
-abstract-parent class
-Final
-none of these
View Answer / Hide Answer
QUESTION - Which model used in swing component?
-Model view controller-Event delegation model
-Document object model
-network model
View Answer / Hide Answer
QUESTION - When several threads act on object simultaneously and the result is reliable then it is known as ____________
-Boxing-Unsynchronized
-synchronized
-none of these
View Answer / Hide Answer
QUESTION - All collection classes in java.util package are implementation classes of different interfaces
-True-False
View Answer / Hide Answer
QUESTION - DeflaterOutputStrem and InflaterInputStream classes are available in which package?
-java.io-java.util
-java.io.zip
-java.util.zip
View Answer / Hide Answer
QUESTION - Process of storing the object contain into the file is known as ______________
-synchronization-serialization
-zip
-doping
View Answer / Hide Answer
QUESTION - Static and transient variable cannot be serialized
-Yes-No
View Answer / Hide Answer
QUESTION - All components from javax.swing are developed in ______________
-C++-C
-pascal
-pure java
View Answer / Hide Answer
QUESTION - FileOutputStream class store the data in the form of _________
-character-file
-bytes
-bit
View Answer / Hide Answer
QUESTION - What is the default buffer size used by any buffered class?
-128 bytes-256 bytes
-512 bytes
-1024 bytes
View Answer / Hide Answer
Download Java interview questions and answers pdf
Explain the difference between Java and JavaScript.Explain how to obtain a performance profile of my Java Program.
Explain the purpose of the executable files that have an extra _g at the end of their names, e.g. java_g.
If Java is platform independent, why doesn't it run on all platforms?
Explain how to access native operating system calls from my Java program.
How do we create and use sockets in Java?
Explain how to send data from my Java program to a CGI program.
Explain the difference between a URL instance and a URLConnection instance.
How do I read a line of input at a time in Java?
Why is thread synchronization important for multithreaded programs?
Explain how to create a thread and start it running.
When should we use an event adapter class?
Explain the component and container classes.
What is the difference between a runtime exception and a plain exception?
Can you explain in brief life cycle for stateless and stateful beans?
What is Passivation and Activation in EJB?
How do we implement caching in JSP?
Explain the different Authentication options available in Servlets.
How can we use beans in JSP?
Explain the difference between JavaBeans and taglib directives.
Explain the different scopes an object can have in a JSP page.
Explain the use of Externalization interface.
Explain widening conversion and Narrowing conversion.
How do we implement deep cloning?
Java interview questions and answers for freshers and experienced
Java features
Simple, Object-Oriented, Robust, Distributed, Portable, Interpreted, Multithreaded, Platform Independent, Secure...........Read answer
Java program execution
What is JVM? Explain its roles and functions.Explain why Java is called as Platform independent language. Explain how Java executable executes on any platform where JVM is available...................
Read answer
Java architecture
Java programming language, Java class file format, Java Application Programming Interface, Java virtual machine.............Read answer
Java class
Explain the features of Java class. Explain Fields, Methods, and Access Levels.What are accessors and mutator methods in a Java class? Explain with example for each.
Explain the importance of 'this' reference. Write a code to depicts the use of 'this' reference
Explain static variables and static methods in Java. Provide an example to explain them..................
Read answer
Java constructors
What is a constructor? Explain the differences between methods and constructor.Differences between constructors and methods.
Write code to depict the use of constructor.....................
Read answer
Java class member
What is instance members? Explain with an exampleWhat is instance variable? Explain with an example
What is instance method? Explain with an example
What is static member? Explain with an example
What is static variable? Explain with an example......................
Read answer
Java packages
What are Java packages? Explain the importance of Java packages.Steps for creating a package in Java
Explain the packages access specifier, i.e. private, protected, public, default.............
Read answer
Java garbage collector
Explain Java Garbage collector. Why garbage collection? Brief explanation of Garbage collection algorithms.Explain the importance of finalizers in Java. Write code to depict the uses of finalizers in Java...............
Read answer
Java super keyword
Explain the importance of 'super' keyword in Java. Write code to depict the uses of 'super' keyword - The keyword ‘super’ is used for referring parent class instance....................Read answer
Java overloading & overriding
Define Method overloading. Explain its uses. Provide a code sample to explain the uses of Method overloadingDefine Method overriding. Explain its uses. Provide a code sample to explain the uses of Method overloading
Difference between overloading and overriding.......................
Read answer
Java string class
Describe Java string class. Explain methods of Java string class. Explain the characteristics of StringBuffer class - String Class: The String class is immutable, The contents of the String object can not be changed, String class is final class. That implies it can not have sub classes......................Read answer
Java inner classes
What is Java inner class? Explain the types of inner classes, i.e. Static member classes, Member classes, Local classes, Anonymous classesNeed of inner class in context with adapter classes
Explain few Wrapper Classes Methods...............
Read answer
Java reflection class
Explain about Java reflection class.Write a code sample to depict the uses of Java reflection class.........
Read answer
Java swing
What is Swing? Explain the need of Swing.Write some important features of Swing.
Describe Java Swing class hierarchy.
Explain the need of Layout manager...........
Read answer
Java layout manager
Explain different layout manager in Java. - A layout manager organizes the objects in a container, Different layouts are used to organize or to arrange objects.............Read answer
Java exception handling
Explain the need of Exception handling.Explain the Exceptions categories, i.e. checked and unchecked exceptions.
Provide the general form of Exception handling constructs with explanation
What is user defined Exception? Explain with an example............
Read answer
Java multithreading
What is Multithreading? Explain the life cycle of a thread.Explain how to use thread class for Multithreading in Java. Explain with an example.
What is Runnable interface? Explain how to use Runnable interface for Multithreading.
What are the methods of thread class in java? Explain them
Can your explain thread priorities?..............
Read answer
Java file handling
Explain the use of Streams.Difference between Stream classes and Reader writer classes
Explain and demonstrate the use of File, RandomAccessFile classes.
Explain the use of Reader and Writer classes..............
Read answer
Java utility classes
What is object Serialization? Explain the use of Persisting object.Depict the step of using object Deserialization.....................
Read answer
Java socket programming
What is socket? Explain the features of socket.Explain the characteristics of Java socket class.
Explain ServerSocket class with an example
Explain InetAddress class with an example
Explain DatagramSocket class with an example
Explain DatagramPacket class with an example.............
Read answer
JDBC
Purposes of JDBC APIDescribe 4 types of JDBC drivers and their characteristics with usages.
State the functionalities of important classes in JDBC packages.
Explain how to use JDBC statement to execute SQL queries. Show in an example
Explain how to use Prepared Statement to execute parameterized queries. Show in an example
What is JDBC Callable Statement?
What is batch updates in JDBC? Explain with an example......................
Read answer
No comments:
Post a Comment