Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
16 views

Core Java Interview Questions

Core Java interview Questions
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Core Java Interview Questions

Core Java interview Questions
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

CORE JAVA INTERVIEW QUSTION SHEET

Why is Java a platform independent language?

- Why is Java not a pure object oriented language?

- What do you understand by an instance variable and a local variable?

- OOPs concepts - So**l**id principles l

- Design patterns

- Access modifiers in java

- Abstract class vs. interface

- Dimond problem

- How do u do Exception handling?

What is throw, throws, try cath and finally blocks - Serialization De- Serialization and
Externalization.

How to not allow serialization of attributes of a class in Java?

- Tell us something about JIT compiler.

- Can you tell the difference between equals() method and equality operator (==) in Java?

- garbage collection in java

- What is heap and stack memory

- What is String constant pool?

- Can the main method be Overloaded?

- Why is the main method static in Java?

- What is final keyword?

- final, finally and finalize keywords use?

- When can you use super keyword?

- What are the differences between JVM, JRE and JDK in Java?

- What are the differences between constructor and method of a class in Java?

- Java works as “pass by value” or “pass by reference” phenomenon?

- optional (Good to have)

- Explain Collection hirachey


Difference between fail fast and fail safe iterator

What are Memory storages available with JVM?


-
1) What do you understand by Blockingqueue?
2) Internal Working of HashMap?
3) Why string is immutable in java ?
4) What is marker interface ?
5) Can you override private and static method in java ? if yes or not then why ?
6) What is method hiding ?
7) Does finally always execute in java?
8) What methods does the object class have ?
9) How can you make a class immutable?

10)What is singleton class and how we can create singleton class ?

What is final and static keyword in java ?


What is array ? why we should use array ?
What is collection framework ? what is collection ?

o How to perform two tasks by two threads?


o How to perform multithreading by anonymous class?
o What is the Thread Scheduler and what is the difference between
preemptive scheduling and time slicing?
o What happens if we start a thread twice?
o What happens if we call the run() method instead of start() method?
o What is the purpose of join method?
o Why JVM terminates the daemon thread if no user threads are
remaining?
o What is the shutdown hook?
o What is garbage collection?
o What is the purpose of finalize() method?
o What does the gc() method?
o What is synchronization and why use synchronization?
o What is the difference between synchronized method and
synchronized block?
o What are the two ways to perform static synchronization?
o What is deadlock and when it can occur?
o What is interthread-communication or cooperation?
o What is the difference between checked and unchecked exceptions?
o What happens behind the code int data=50/0;?
o Why use multiple catch block?
o Is there any possibility when the finally block is not executed?
o What is exception propagation?
o What is the difference between the throw and throws keyword?
o What are the 4 rules for using exception handling with method
overriding?
o What is Exception in java ?
o What is difference between exception or error?
o Explain difference between checked and unchecked exception?
o Can we change the order of try, catch and finally ?
o Explain the purpose of finally block ?
o What is purpose of throws keyword in method Signature?
o How can you handle exception in multi-threaded environment ?
o Can you throw an exception without using the throw keyword?
o What happen if an exception is not caught or declare ?
o Can we write only try block ?
o What is unreachable catch block error?
o Can we keep the statement after finally block if the finally block is
returning the control?
o Does finally block get executed if either try or catch block are returning
the control?
o Final, Finally, Finalize ?
o What is re-throwing in java ?
o Can we override the
o Which class is super class for all types of errors and exception in java ?
o What is try-with-resource block?
o Is it possible to throw ans exception inside the lambda expression
o What do you mean by ClassCast exception ?
o What is exception Propagation ?
o Which methods provided by throwable ?
o Explain stack trace in java ?
o How to create user defined exception in java ?
o How to catch multiple Exception using single cath block ?
o ClassNotFound Exception and NotCLassFOundError
o How to handle null pointer exception in java ?
o What is StackOverflow Error in java ?
o How to connect Java application with Oracle and Mysql database using
JDBC?
o What is the difference between Statement and PreparedStatement
interface?
o How to print total numbers of tables and views of a database using
JDBC?
o How to store and retrieve images from Oracle database using JDBC?
o How to store and retrieve files from Oracle database using JDBC?
o Explain what is JDBC?
o What is ResultSet?
o Can you get a null ResultSet?
o Explain the difference between ResultSet Vs. RowSet vs in JDBC?
o What is a JDBC driver?
o What is DriverManager in JDBC?
o Explain the different drivers of JDBC.
o Explain which is the most commonly used and fastest JDBC driver.
o What are the data types used for storing images and files in the
database table?
o . Explain what DatabaseMetaData is and why would you use it?
o Explain the differences between JDBC and ODBC?
o What is Rowset?
o What is ResultSet?
o What are the types of ResultSet?
o Explain the advantages of a Rowset.
o Explain what are the different JDBC statements:
o . Are there any advantages of using a Prepared Statement in Java?
o Explain the term connection pooling.
o Explain the types of JDBC Architecture?
o What are the steps to connect with JDBC?
o Explain the meaning of hot backup and cold backup.
o Explain if the JDBC-ODBC Bridge supports different concurrent open
statements per connection?
o What are database warnings in JDBC and explain how we can manage
database warnings in JDBC?
o Explain the difference between executeQuery, executing, and
executeUpdate in JDBC?
o Explain what you mean by Metadata and also explain why we use it.
o Explain why you would use setAutoCommit(false) in JDBC?
o Explain the role of Class.forName while loading drivers in brief?
o Why are prepared statements faster?
o What are the JDBC API components?
o What are the JDBC statements?
o Mention the return type of Class.forName() method?
o Explain the differences between Statement and PreparedStatement
interface?
o How can we set a null value in JDBC PreparedStatement?
o Explain the benefits of Prepared Statement over Statement?
o Explain the execution of stored procedures using Callable Statement?
o Describe the role of the JDBC DriverManager class.
o Mention the functions of the JDBC Connection interface?
o What is the JDBC ResultSet interface?
o What is the JDBC ResultSetMetaData interface?
o Mention the interface which enables transaction management in JDBC.
o Explain batch processing and method to perform batch p rocessing in
JDBC?
o Explain CLOB and BLOB data types in JDBC?
o What are the different types of lockings in JDBC?
o How can we store and retrieve images from the database?
o How can we store the file in the Oracle database?
o How can we retrieve the file in the Oracle database?
o Mention the differences between stored procedures and functions?
o Mention ways to maintain the integrity of a database by using JDBC?
o What is the role of the JDBC setMaxRows method?

You might also like