SlideShare a Scribd company logo
Tuesday,October1,2013TOPSTechnologies-JavaTutorial
1
TOPSTechnologies–JavaIntroductoryTutorial
2
JAVA INTERVIEW
QUESTION AND ANSWER
TOPS Technologies – Java Introductory Tutorial
Module :1( theory)
http://www.tops-int.com/
JAVA INTERVIEW QUESTION AND
ANSWER
Q1. What is the difference between an Abstract class and Interface?
A1. Abstract classes may have some executable methods and methods left
unimplemented. Interfaces contain no implementation code.
2. An class can implement any number of interfaces, but subclass at most
one abstract class.
3. An abstract class can have nonabstract methods. All methods of an
interface are
abstract.
4. An abstract class can have instance variables. An interface cannot.
5. An abstract class can define constructor. An interface cannot.
6. An abstract class can have any visibility: public, protected, private or none
(package). An interface's visibility must be public or none (package).
7. An abstract class inherits from Object and includes methods such as
clone() and
equals().
Tuesday,October1,2013
3
TOPSTechnologies-JavaTutorial
Q2.WHAT ARE CHECKED AND UNCH
ECKED EXCEPTIONS?
• Java defines two kinds of exceptions :
• Checked exceptions : Exceptions that inherit from
the Exception class are
checked exceptions. Client code has to handle the checked exceptions
thrown by
the API, either in a catch clause or by forwarding it outward with the throws
clause.
Examples - SQLException, IOxception.
• Unchecked exceptions : RuntimeException also extends from Exception.
However,
all of the exceptions that inherit from RuntimeException get special treatment.
There is no requirement for the client code to deal with them, and hence they
are
called unchecked exceptions. Example Unchecked exceptions are
NullPointerException, OutOfMemoryError, DivideByZeroException typica
lly,
programming errors.
Tuesday,October1,2013
4
TOPSTechnologies-JavaTutorial
Q3.WHAT IS THE DIFFERENCE BET
WEEN AN ABSTRACT CLASS AND IN
TERFACE?
 1. Abstract classes may have some executable methods and methods left
unimplemented. Interfaces contain no implementation code.
2. An class can implement any number of interfaces, but subclass at most
one abstract class.
3. An abstract class can have nonabstract methods. All methods of an
interface are
abstract.
4. An abstract class can have instance variables. An interface cannot.
5. An abstract class can define constructor. An interface cannot.
6. An abstract class can have any visibility: public, protected, private or none
(package). An interface's visibility must be public or none (package).
7. An abstract class inherits from Object and includes methods such as
clone() and
equals().
Tuesday,October1,2013
5
TOPSTechnologies-JavaTutorial
Q4.WHAT IS THE DIFFERENCE BETWE
EN C++ & JAVA?
Well as Bjarne Stroustrup says "..despite the syntactic
similarities, C++ and Java are very different languages. In
many ways, Java seems closer to Smalltalk than to C++..".
Here are few I discovered:
• Java is multithreaded
• Java has no pointers
• Java has automatic memory management (garbage
collection)
• Java is platform independent (Stroustrup may differ by
saying "Java is a platform"
• Java has built-in support for comment documentation
• Java has no operator overloading
• Java doesn’t provide multiple inheritance
• There are no destructors in Java
Tuesday,October1,2013
6
TOPSTechnologies-JavaTutorial
QUESTION AND ANSWER
 Q5.Why java is not a 100% oops?
Many people say this because Java uses primitive
types such as int, char, double. But then all the rest
are objects. Confusing question.
Q6.What is a resource bundle?
In its simplest form, a resource bundle is
represented by a text file containing keys and a text
value for each key.
Tuesday,October1,2013
7
TOPSTechnologies-JavaTutorial
 Q.7.WHAT IS THE DIFFERENCE BETW
EEN PREEMPTIVE SCHEDULING AND T
IME SLICING?
 Under preemptive scheduling, the highest priority
task executes until it enters the waiting or dead
states or a higher priority task comes into
existence. Under time slicing, a task executes for a
predefined slice of time and then reenters the pool
of ready tasks. The scheduler then determines
which task should execute next, based on priority
and other factors.
Tuesday,October1,2013
8
TOPSTechnologies-JavaTutorial
Q.8.WHAT IS THE DIFFERENCE BETWEEN T
HE BOOLEAN & OPERATOR AND THE && O
PERATOR?
• If an expression involving the Boolean & operator is 
evaluated, both operands are
evaluated. Then the & operator is applied to the 
operand. When an expression involving the && 
operator is evaluated, the first operand is 
evaluated. If the first operand returns a value of true 
then the second operand is evaluated. The && 
operator is then applied to the first and second 
operands. If the first operand evaluates to false, the 
evaluation of the second operand is skipped.
Tuesday, October 1, 2013
9
TOPS Technologies - Java Tutorial
Q.9WHAT IS THE PURPOSE OF THE WA
IT(), NOTIFY(), AND NOTIFYALL() METH
ODS?
• The wait(),notify(), and notifyAll() methods are used
 to provide an efficient way for threadsto wait for a s
hared resource. When a thread executes an object'
s wait() method, it entersthe waiting state. It only en
ters the ready state after another thread invokes the
 object'snotify() or notifyAll() methods.
Tuesday, October 1, 2013
10
TOPS Technologies - Java Tutorial
Q10.HOW ARE OBSERVER AND OBSER
VABLE USED?
• Objects that subclass the Observable class 
maintain a list of observers. When an Observable 
object is updated it invokes the update() method of 
each of its observers to notify the observers that it 
has changed state. The Observer interface is 
implemented by objects that observe Observable 
objects.
Tuesday, October 1, 2013
11
TOPS Technologies - Java Tutorial
AND MORE QUESTION ANSWER AND 
INTERVIEW TRAINING AND PRACTICE AT 
TOPS TECHNOLOGIES
 BIO:
 http://www.tops-int.com/
 http://www.tops-int.com/java-training-course.html
 Visit nearest center of your city
 TOPS Technologies Baroda
 Baroda Office
 301 Saffron Complex,
Fatehgunj,
Baroda.
97253 55009
Tuesday, October 1, 2013
12
TOPS Technologies - Java Tutorial
Tuesday,October1,2013
13
TOPSTechnologies-JavaTutorial

More Related Content

PPTX
OOPS In JAVA.pptx
Sachin33417
 
PDF
Java Garbage Collection - How it works
Mindfire Solutions
 
PPT
Oops in Java
malathip12
 
PPT
Java Servlets
BG Java EE Course
 
PDF
Servlet and servlet life cycle
Dhruvin Nakrani
 
ODP
Groovy intro
NexThoughts Technologies
 
PDF
Java threads
Prabhakaran V M
 
PDF
Java IO
UTSAB NEUPANE
 
OOPS In JAVA.pptx
Sachin33417
 
Java Garbage Collection - How it works
Mindfire Solutions
 
Oops in Java
malathip12
 
Java Servlets
BG Java EE Course
 
Servlet and servlet life cycle
Dhruvin Nakrani
 
Java threads
Prabhakaran V M
 
Java IO
UTSAB NEUPANE
 

What's hot (20)

PPT
C# Exceptions Handling
sharqiyem
 
PPTX
Introduction to Java -unit-1
RubaNagarajan
 
PDF
Introduction to Java Programming
Ravi Kant Sahu
 
PPTX
Introduction to Object Oriented Programming
Moutaz Haddara
 
PPTX
Introduction to php
Taha Malampatti
 
PPTX
Garbage collection
Somya Bagai
 
PDF
Java Thread Synchronization
Benj Del Mundo
 
PDF
Powershell training material
Dr. Awase Khirni Syed
 
PPTX
Strings in Java
Abhilash Nair
 
PPT
Fundamentals of JAVA
KUNAL GADHIA
 
PPTX
Servlets
Rajkiran Mummadi
 
PPTX
Basics of JAVA programming
Elizabeth Thomas
 
PDF
What are Abstract Classes in Java | Edureka
Edureka!
 
PPT
Introduction to Javascript
Amit Tyagi
 
PPTX
Java script
reddivarihareesh
 
PPTX
Introduction to java
Sandeep Rawat
 
PPTX
Fundamentals of OOP (Object Oriented Programming)
MD Sulaiman
 
PDF
A seminar report on core java
Aisha Siddiqui
 
PPT
Awt controls ppt
soumyaharitha
 
C# Exceptions Handling
sharqiyem
 
Introduction to Java -unit-1
RubaNagarajan
 
Introduction to Java Programming
Ravi Kant Sahu
 
Introduction to Object Oriented Programming
Moutaz Haddara
 
Introduction to php
Taha Malampatti
 
Garbage collection
Somya Bagai
 
Java Thread Synchronization
Benj Del Mundo
 
Powershell training material
Dr. Awase Khirni Syed
 
Strings in Java
Abhilash Nair
 
Fundamentals of JAVA
KUNAL GADHIA
 
Basics of JAVA programming
Elizabeth Thomas
 
What are Abstract Classes in Java | Edureka
Edureka!
 
Introduction to Javascript
Amit Tyagi
 
Java script
reddivarihareesh
 
Introduction to java
Sandeep Rawat
 
Fundamentals of OOP (Object Oriented Programming)
MD Sulaiman
 
A seminar report on core java
Aisha Siddiqui
 
Awt controls ppt
soumyaharitha
 
Ad

Viewers also liked (20)

DOCX
Basic java important interview questions and answers to secure a job
Garuda Trainings
 
PDF
Java programming-examples
Mumbai Academisc
 
DOCX
Java codes
Hussain Sherwani
 
DOCX
Java questions for viva
Vipul Naik
 
PDF
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
DOCX
Java PRACTICAL file
RACHIT_GUPTA
 
DOCX
Interview Questions and Answers for Java
Garuda Trainings
 
PDF
Java Interview Questions by NageswaraRao
JavabynataraJ
 
PDF
201 core java interview questions oo ps interview questions - javatpoint
ravi tyagi
 
DOC
Final JAVA Practical of BCA SEM-5.
Nishan Barot
 
PDF
Advanced Java Practical File
Soumya Behera
 
DOC
A must Sql notes for beginners
Ram Sagar Mourya
 
DOC
Manual testing interview question by INFOTECH
Pravinsinh
 
DOCX
Java practical
shweta-sharma99
 
DOC
Sql queries with answers
vijaybusu
 
PDF
Java collections-interview-questions
yearninginjava
 
PDF
Hiring_Data_Scientist
Ihor Malchenyuk
 
PDF
Java interview questions
rithustutorials
 
PPT
11 advance inheritance_concepts
Arriz San Juan
 
PDF
5th semester Computer Science and Information Science Engg (2013 December) Qu...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Basic java important interview questions and answers to secure a job
Garuda Trainings
 
Java programming-examples
Mumbai Academisc
 
Java codes
Hussain Sherwani
 
Java questions for viva
Vipul Naik
 
Top 10 Java Interview Questions and Answers 2014
iimjobs and hirist
 
Java PRACTICAL file
RACHIT_GUPTA
 
Interview Questions and Answers for Java
Garuda Trainings
 
Java Interview Questions by NageswaraRao
JavabynataraJ
 
201 core java interview questions oo ps interview questions - javatpoint
ravi tyagi
 
Final JAVA Practical of BCA SEM-5.
Nishan Barot
 
Advanced Java Practical File
Soumya Behera
 
A must Sql notes for beginners
Ram Sagar Mourya
 
Manual testing interview question by INFOTECH
Pravinsinh
 
Java practical
shweta-sharma99
 
Sql queries with answers
vijaybusu
 
Java collections-interview-questions
yearninginjava
 
Hiring_Data_Scientist
Ihor Malchenyuk
 
Java interview questions
rithustutorials
 
11 advance inheritance_concepts
Arriz San Juan
 
5th semester Computer Science and Information Science Engg (2013 December) Qu...
BGS Institute of Technology, Adichunchanagiri University (ACU)
 
Ad

Similar to Most Asked Java Interview Question and Answer (20)

PDF
Java Faqs useful for freshers and experienced
yearninginjava
 
PDF
Top 371 java fa qs useful for freshers and experienced
Gaurav Maheshwari
 
TXT
Java interview
Mohammad Shahban
 
DOCX
Master of Computer Application (MCA) – Semester 4 MC0078
Aravind NC
 
PDF
JAVA INTERVIEW QUESTIONS.pdf java developer engineer
MinElectroneum
 
PDF
JAVA TECHNICAL INTERVIEW.pdf java developer engineer
MinElectroneum
 
PDF
20 most important java programming interview questions
Gradeup
 
PDF
Core_Java_Interview.pdf
ansariparveen06
 
DOCX
Java Interview Questions For Freshers
zynofustechnology
 
DOC
Java interview questions
G C Reddy Technologies
 
PDF
__ Java Technical round questions .pdf soo
Rajkumar751652
 
PDF
Java Interview Questions
Kuntal Bhowmick
 
PPTX
Lecture 18
talha ijaz
 
PPTX
abstract,final,interface (1).pptx upload
dashpayal697
 
DOCX
Core java questions
Pradheep Ayyanar
 
PDF
Javainterviewquestions 110607071413-phpapp02
lakk1234
 
PDF
Javainterviewquestions 110607071413-phpapp02
Kumaran K
 
PDF
Advanced Programming _Abstract Classes vs Interfaces (Java)
Professor Lili Saghafi
 
DOCX
Jist of Java
Nikunj Parekh
 
DOCX
JAVA CONCEPTS AND PRACTICES
Nikunj Parekh
 
Java Faqs useful for freshers and experienced
yearninginjava
 
Top 371 java fa qs useful for freshers and experienced
Gaurav Maheshwari
 
Java interview
Mohammad Shahban
 
Master of Computer Application (MCA) – Semester 4 MC0078
Aravind NC
 
JAVA INTERVIEW QUESTIONS.pdf java developer engineer
MinElectroneum
 
JAVA TECHNICAL INTERVIEW.pdf java developer engineer
MinElectroneum
 
20 most important java programming interview questions
Gradeup
 
Core_Java_Interview.pdf
ansariparveen06
 
Java Interview Questions For Freshers
zynofustechnology
 
Java interview questions
G C Reddy Technologies
 
__ Java Technical round questions .pdf soo
Rajkumar751652
 
Java Interview Questions
Kuntal Bhowmick
 
Lecture 18
talha ijaz
 
abstract,final,interface (1).pptx upload
dashpayal697
 
Core java questions
Pradheep Ayyanar
 
Javainterviewquestions 110607071413-phpapp02
lakk1234
 
Javainterviewquestions 110607071413-phpapp02
Kumaran K
 
Advanced Programming _Abstract Classes vs Interfaces (Java)
Professor Lili Saghafi
 
Jist of Java
Nikunj Parekh
 
JAVA CONCEPTS AND PRACTICES
Nikunj Parekh
 

More from TOPS Technologies (20)

PPSX
Learn java objects inheritance-overriding-polymorphism
TOPS Technologies
 
PDF
Surat tops conducted one hour seminar on “corporate basic skills”
TOPS Technologies
 
PPT
Word press interview question and answer tops technologies
TOPS Technologies
 
PPT
How to install android sdk
TOPS Technologies
 
PPTX
Software testing and quality assurance
TOPS Technologies
 
PPTX
Basics in software testing
TOPS Technologies
 
PPTX
Learn advanced java programming
TOPS Technologies
 
PPTX
How to create android applications
TOPS Technologies
 
PPTX
What is ui element in i phone developmetn
TOPS Technologies
 
PPTX
How to create android applications
TOPS Technologies
 
PPTX
Java live project training
TOPS Technologies
 
PPTX
Software testing live project training
TOPS Technologies
 
PPTX
Web designing live project training
TOPS Technologies
 
PPTX
Php live project training
TOPS Technologies
 
PPT
iPhone training in ahmedabad by tops technologies
TOPS Technologies
 
PPT
Php training in ahmedabad
TOPS Technologies
 
PPT
Java training in ahmedabad
TOPS Technologies
 
PPT
08 10-2013 gtu projects - develop final sem gtu project in i phone
TOPS Technologies
 
PPT
GTU PHP Project Training Guidelines
TOPS Technologies
 
PPT
GTU Asp.net Project Training Guidelines
TOPS Technologies
 
Learn java objects inheritance-overriding-polymorphism
TOPS Technologies
 
Surat tops conducted one hour seminar on “corporate basic skills”
TOPS Technologies
 
Word press interview question and answer tops technologies
TOPS Technologies
 
How to install android sdk
TOPS Technologies
 
Software testing and quality assurance
TOPS Technologies
 
Basics in software testing
TOPS Technologies
 
Learn advanced java programming
TOPS Technologies
 
How to create android applications
TOPS Technologies
 
What is ui element in i phone developmetn
TOPS Technologies
 
How to create android applications
TOPS Technologies
 
Java live project training
TOPS Technologies
 
Software testing live project training
TOPS Technologies
 
Web designing live project training
TOPS Technologies
 
Php live project training
TOPS Technologies
 
iPhone training in ahmedabad by tops technologies
TOPS Technologies
 
Php training in ahmedabad
TOPS Technologies
 
Java training in ahmedabad
TOPS Technologies
 
08 10-2013 gtu projects - develop final sem gtu project in i phone
TOPS Technologies
 
GTU PHP Project Training Guidelines
TOPS Technologies
 
GTU Asp.net Project Training Guidelines
TOPS Technologies
 

Recently uploaded (20)

PPTX
Understanding operators in c language.pptx
auteharshil95
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PDF
Introducing Procurement and Supply L2M1.pdf
labyankof
 
PDF
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PPTX
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
PPTX
Introduction and Scope of Bichemistry.pptx
shantiyogi
 
PDF
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
PDF
High Ground Student Revision Booklet Preview
jpinnuck
 
PDF
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
PPTX
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
PPTX
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
PPTX
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
PDF
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
PDF
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
Understanding operators in c language.pptx
auteharshil95
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
Introducing Procurement and Supply L2M1.pdf
labyankof
 
1.Natural-Resources-and-Their-Use.ppt pdf /8th class social science Exploring...
Sandeep Swamy
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
Information Texts_Infographic on Forgetting Curve.pptx
Tata Sevilla
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 
Introduction and Scope of Bichemistry.pptx
shantiyogi
 
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
High Ground Student Revision Booklet Preview
jpinnuck
 
The Minister of Tourism, Culture and Creative Arts, Abla Dzifa Gomashie has e...
nservice241
 
NOI Hackathon - Summer Edition - GreenThumber.pptx
MartinaBurlando1
 
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
Types of Literary Text: Poetry and Prose
kaelandreabibit
 

Most Asked Java Interview Question and Answer