SlideShare a Scribd company logo
JAVA QUESTIONS 3
1. Does importing a package imports the subpackages as well? Example: Does
importing com.MyTest.* also import com.MyTest.UnitTests.*?
2. What is the difference between declaring a variable and defining a variable?
3. What is the default value of an object reference declared as an instance
variable?
4. Can a top level class be private or protected?
5. What type of parameter passing does Java support?
6. Primitive data types are passed by reference or pass by value?
7. Objects are passed by value or by reference?
8. What is serialization?
9. How do I serialize an object to a file?
10.Which methods of Serializable interface should I implement?
11.How can I customize the seralization process? i.e. how can one have a control
over the serialization process?
12.What is the common usage of serialization?
13.What is Externalizable interface?
14.When you serialize an object, what happens to the object references included in
the object?
15.What one should take care of while serializing the object?
16.What happens to the static fields of a class during serialization?
17.Does Java provide any construct to find out the size of an object?
18.What are wrapper classes?
19.Why do we need wrapper classes?
20.What are checked exceptions?
21.What are runtime exceptions?
22.What is the difference between error and an exception?
23.How to create custom exceptions?
24.If I want an object of my class to be thrown as an exception object, what should I
do?
25.If my class already extends from some other class what should I do if I want an
instance of my class to be thrown as an exception object?

More Related Content

PDF
Probable questions for semester exam
PPTX
Implementing polymorphism
DOC
Wk2 questions
PPTX
Mocking the unmockable with Moles
PPTX
Threads in Java
DOCX
Java Core Parctical
PPTX
PPTX
Chap1 packages
Probable questions for semester exam
Implementing polymorphism
Wk2 questions
Mocking the unmockable with Moles
Threads in Java
Java Core Parctical
Chap1 packages

Similar to JAVA INTERVIEW QUESTIONS -3 (20)

PPTX
Assignmentjsnsnshshusjdnsnshhzudjdndndjd
PPT
Presentation to java
PPT
PPT
Java
DOCX
PDF
Java training materials for computer engineering.pdf
PPTX
PPT
Md03 - part3
PPTX
Presentation2.ppt java basic core ppt .
PPTX
Java Jive 002.pptx
PDF
Top 100 Java Interview Questions and Answers.pdf
PPTX
Java_Roadmap.pptx
PDF
Java Interview Questions by NageswaraRao
PDF
Javainterviewquestions 110607071413-phpapp02
PDF
Javainterviewquestions 110607071413-phpapp02
PPT
Introduction to java
PPTX
PPTX
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
PDF
Core java part1
Assignmentjsnsnshshusjdnsnshhzudjdndndjd
Presentation to java
Java
Java training materials for computer engineering.pdf
Md03 - part3
Presentation2.ppt java basic core ppt .
Java Jive 002.pptx
Top 100 Java Interview Questions and Answers.pdf
Java_Roadmap.pptx
Java Interview Questions by NageswaraRao
Javainterviewquestions 110607071413-phpapp02
Javainterviewquestions 110607071413-phpapp02
Introduction to java
OOPS in java | Super and this Keyword | Memory Management in java | pacakages...
Core java part1
Ad

More from zynofustechnology (15)

DOCX
JAVA QUESTIONS -6
DOCX
JAVA QUESTIONS FOR INTERVIEW-3
PDF
PYTHON INTERVIEW QUESTIONS-4
PDF
PYTHON INTERVIEW QUESTIONS-2
PDF
Java Interview Questions-5
DOCX
Java Interview Questions - 1
DOCX
SQL Interview Questions For Experienced
DOCX
Software Testing Interview Questions For Experienced
DOCX
Python Interview Questions For Experienced
DOCX
Python Interview Questions For Freshers
DOCX
Java Interview Questions For Freshers
DOCX
HR interview questions
DOCX
Digital marketing questions -3
DOCX
Digital marketing questions -2
DOCX
Digital marketing questions 1
JAVA QUESTIONS -6
JAVA QUESTIONS FOR INTERVIEW-3
PYTHON INTERVIEW QUESTIONS-4
PYTHON INTERVIEW QUESTIONS-2
Java Interview Questions-5
Java Interview Questions - 1
SQL Interview Questions For Experienced
Software Testing Interview Questions For Experienced
Python Interview Questions For Experienced
Python Interview Questions For Freshers
Java Interview Questions For Freshers
HR interview questions
Digital marketing questions -3
Digital marketing questions -2
Digital marketing questions 1
Ad

Recently uploaded (20)

PDF
medical staffing services at VALiNTRY
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
top salesforce developer skills in 2025.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
history of c programming in notes for students .pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
AI in Product Development-omnex systems
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
System and Network Administration Chapter 2
medical staffing services at VALiNTRY
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
top salesforce developer skills in 2025.pdf
Understanding Forklifts - TECH EHS Solution
history of c programming in notes for students .pptx
L1 - Introduction to python Backend.pptx
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
AI in Product Development-omnex systems
Odoo Companies in India – Driving Business Transformation.pdf
ai tools demonstartion for schools and inter college
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
wealthsignaloriginal-com-DS-text-... (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Operating system designcfffgfgggggggvggggggggg
Design an Analysis of Algorithms I-SECS-1021-03
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
System and Network Administration Chapter 2

JAVA INTERVIEW QUESTIONS -3

  • 1. JAVA QUESTIONS 3 1. Does importing a package imports the subpackages as well? Example: Does importing com.MyTest.* also import com.MyTest.UnitTests.*? 2. What is the difference between declaring a variable and defining a variable? 3. What is the default value of an object reference declared as an instance variable? 4. Can a top level class be private or protected? 5. What type of parameter passing does Java support? 6. Primitive data types are passed by reference or pass by value? 7. Objects are passed by value or by reference? 8. What is serialization? 9. How do I serialize an object to a file? 10.Which methods of Serializable interface should I implement? 11.How can I customize the seralization process? i.e. how can one have a control over the serialization process? 12.What is the common usage of serialization? 13.What is Externalizable interface? 14.When you serialize an object, what happens to the object references included in the object? 15.What one should take care of while serializing the object? 16.What happens to the static fields of a class during serialization? 17.Does Java provide any construct to find out the size of an object? 18.What are wrapper classes? 19.Why do we need wrapper classes? 20.What are checked exceptions? 21.What are runtime exceptions? 22.What is the difference between error and an exception? 23.How to create custom exceptions? 24.If I want an object of my class to be thrown as an exception object, what should I do? 25.If my class already extends from some other class what should I do if I want an instance of my class to be thrown as an exception object?