Saturday, 27 April 2019

Commonly Asked Java Programming VIVA Questions and Answers

Top 30 Viva Questions & Answers for Java Developers:





1.What is JVM?
The Java interpreter along with the run time environment required to run the Java application in called as Java virtual machine(JVM)

 2. What is the most important feature of Java?
Java is a platform independent language.

3. What do you mean by platform independence?
Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).

 4. What is the difference between a JDK and a JVM?
JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.

5. What is the base class of all classes?
java.lang.Object

 6. What are the access modifiers in Java?
There are 3 access modifiers. Public, protected and private, and the default one if no identifier is specified is called friendly, but programmer cannot specify the friendly identifier explicitly.

 7. What is are packages?
 A package is a collection of related classes and interfaces providing access protection and namespace   management.

 8. What is meant by Inheritance and what are its advantages?
 Inheritance is the process of inheriting all the features from a class. The advantages of inheritance are reusability  of code and accessibility of variables and methods of the super class by sub classes.

 9. What is the difference between superclass and subclass?
 A super class is a class that is inherited whereas sub class is a class that does the inheriting.

 10. What is an abstract class?
 An abstract class is a class designed with implementation gaps for sub classes to fill in and is deliberately  incomplete.

 11. What are the states associated in the thread?
 Thread contains ready, running, waiting and dead states.

 12. What is synchronization?
 Synchronization is the mechanism that ensures that only one thread is accessed the resources at a time.

 13. What is deadlock?
 When two threads are waiting each other and can’t precede the program is said to be deadlock.

 14. What is an applet?
 Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser

 15. What is the lifecycle of an applet?
init() method - Can be called when an applet is first loaded
start() method - Can be called each time an applet is started.
paint() method - Can be called when the applet is minimized or maximized.
stop() method - Can be used when the browser moves off the applet’s page.
destroy() method - Can be called when the browser is finished with the applet.


 16. How do you set security in applets?
  using setSecurity Manager() method

 17. What is a layout manager and what are different types of layout managers available in java AWT?
 A layout manager is an object that is used to organize components in a container. The different layouts are    available are FlowLayout, BorderLayout, CardLayout, GridLayout and GridBagLayout

 18. What is JDBC?
 JDBC is a set of Java API for executing SQL statements. This API consists of a set of classes and interfaces to  enable programs to write pure Java Database applications.

 19. What are drivers available?
 a) JDBC-ODBC Bridge driver b) Native API Partly-Java driver
 c) JDBC-Net Pure Java driver d) Native-Protocol Pure Java driver

 20. What is stored procedure?
Stored procedure is a group of SQL statements that forms a logical unit and performs a particular task. Stored Procedures are used to encapsulate a set of operations or queries to execute on database. Stored procedures can be compiled and executed with different parameters and results and may have any combination of input/output parameters.

 21. What is the Java API?
The Java API is a large collection of ready-made software components that provide many useful capabilities, such as graphical user interface (GUI) widgets.

 22. Why there are no global variables in Java?
Global variables are globally accessible. Java does not support globally accessible variables due to following reasons:
1)The global variables breaks the referential transparency
2)Global variables creates collisions in namespace.

 23. What are Encapsulation, Inheritance and Polymorphism?
 Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse. Inheritance is the process by which one object acquires the properties of another object. Polymorphism is the feature that allows one interface to be used for general class actions.

 24. What is the use of bin and lib in JDK?
Bin contains all tools such as javac, appletviewer, awt tool, etc., whereas lib contains API and all packages.

 25. What is method overloading and method overriding?
Method overloading: When a method in a class having the same method name with different arguments is said to be method overloading. Method overriding : When a method in a class having the same method name with same arguments is said to be method overriding.

 26. What is the difference between this() and super()?
this() can be used to invoke a constructor of the same class whereas super() can be used to invoke a super class constructor.

 27. What is Domain Naming Service(DNS)?
It is very difficult to remember a set of numbers(IP address) to connect to the Internet. The Domain Naming Service(DNS) is used to overcome this problem. It maps one particular IP address to a string of characters. For example, www. mascom. com implies com is the domain name reserved for US commercial sites, moscom is the name of the company and www is the name of the specific computer, which is mascom’s server.

 28. What is URL?
URL stands for Uniform Resource Locator and it points to resource files on the Internet. URL has four components: http://www. address. com:80/index.html, where http - protocol name, address - IP address or host name, 80 - port number and index.html - file path.

 29. What is RMI and steps involved in developing an RMI object?
Remote Method Invocation (RMI) allows java object that executes on one machine and to invoke the method of a Java object to execute on another machine. The steps involved in developing an RMI object are: a) Define the interfaces b) Implementing these interfaces c) Compile the interfaces and their implementations with the java compiler d) Compile the server implementation with RMI compiler e) Run the RMI registry f) Run the application.

30. What is RMI architecture?
RMI architecture consists of four layers and each layer performs specific functions: a) Application layer - contains the actual object definition. b) Proxy layer - consists of stub and skeleton. c) Remote Reference layer - gets the stream of bytes from the transport layer and sends it to the proxy layer. d) Transportation layer - responsible for handling the actual machine-to-machine communication.

63 comments:

maddison said...

The post is really well written and presents an interesting piece of information, thank you. I was looking at MCQs preparation for Engineering Competitive Exams for long. Now, I can make time to go through this and apply the information wherever I can. It will really help me to complete my assignment on Engineering Competitive Exams.

Jahan said...

Complete Career Guideline for Diploma holder or engineer and free courses for Marine and seafarers. http://howtofactory.blogspot.com

Engineering Books PDF said...

Download Free Books related to Engineering, Mathematics, Physics, Chemistry, etc...
www.EngineeringBooksPDF.com

Credit Loan Solution said...


You can't believe what i just got,… A loan of $ 60,000. I have been looking for a loan for the past 2years until i was referred to a legitimate lender. Though it was not that easy to approve my loan, as you know nothing good comes easy. But I got my loan within 4 hours i got my loan, and before i knew it, the loan was transferred to me. please friends, don't let any body deceive you and scam you for this is real. Contact them via Email: gaincreditloan1@gmail.com OR You can also whatsApp them at: at +31-635-250-311 (WhatsApp Only)

Sunny patel said...

Thanks for sharing this great article! That is very interesting I love reading and I am always searching for informative articles like this
best MBA college in bareilly

Lea Paige Matteo said...

How Lemeridian funding service  grant me a loan!!!

Hello everyone, I'm Lea Paige Matteo from Zurich Switzerland and want to use this medium to express gratitude to lemeridian funding service for fulfilling his promise by granting me a loan, I was stuck in a financial situation and needed to refinance and pay my bills as well as start up a Business. I tried seeking for loans from various loan firms both private and corporate organisations but never succeeded and most banks declined my credit request. But as God would have it, I was introduced by a friend named Lisa Rice to Le_meridian funding service and undergone the due process of obtaining a loan from the company, to my greatest surprise within 48hrs just like my friend Lisa, I was also granted a loan of $216,000.00 So my advise to everyone who desires a loan, "if you must contact any firm with reference to securing a loan online with low interest rate of 1.9% and better repayment plans/schedule, please contact Le_meridian funding service. Besides, he doesn't know that am doing this but due to the joy in me, I'm so happy and wish to let people know more about this great company whom truly give out loans, it is my prayer that GOD should bless them more as they put smiles on peoples faces. You can contact them via email on {lfdsloans@lemeridianfds.com Or lfdsloans@outlook.com} or Text through Whatsapp +1-989 394 3740.

Amit Kumar said...

Hello…Content of your blog is awesome. I really liked it. Thanks for sharing this blog. Visit our website for fashion designing colleges in up

Amit Kumar said...

Hello…Content of your blog is awesome. I really liked it. Thanks for sharing this blog. Visit our website for fashion designing colleges in up

Maariah said...

Very significant Information for us, I have think the representation of this Information is actually superb one. This is my first visit to your site. Floating Oak Shelves

Avni Singh said...

Hello…Content of your blog is awesome. I really liked it. Thanks for sharing this blog. Visit our website for top 10 universities in up
mba in finance fees in up
best management colleges in up

Haiden Hays said...

After a lengthy interviewing process with mortgage lenders we ended up going with Mr Benjamin lee loan offer at his Home Mortgage loan offer. As a first time home buyer, he was absolutely wonderful in helping us secure our mortgage, providing great advice, and always looking out for our best interest. I would definitely recommend anyone that is buying a home or looking for a positive loan lender to finance his needs or business to use Mr Benjamin Lee and his team on any kind of loan.I Will absolutely use them again in the future.  

You can contact a loan officer Ben On Email : 247officedept@gmail.com   Or Whats-App Communication:  +1-989-394-3740.Good luck.

Sana Khan said...

Thanks for sharing this great article! That is very interesting I love reading and And its most important for Every Students like this>>>>>>>>>llb course fees in private college
mba admission fees in up

Komal Gupta said...

Fantastic articles is post by you in this blog. You give a nice thing. Thank you for such a nice article. Every word og this blog helps me to give detail to me
civil engineering course fees in up

Monika Roy said...

Hello…Content of your blog is awesome. I really liked it. Thanks for sharing this blog. Visit our website for top 10
Best B.Tech+MBA integrated university in UP
best management college in bareilly

Soniya Khan said...
This comment has been removed by the author.
Soniya Khan said...

wonderfull article..! I really loved reading through this article. If you are looking civil engineering course fees in up is the best institute .

Renuka Singh said...

Hello…Content of your blog is awesome. I really liked it. Thanks for sharing this blog. Visit here>>>>>mba in finance fees in up
B.Tech. Civil Engineering University in UP

ATS Destinaire said...

ATS Destinaire is a destination for investment and self-use. We offer affordable 3 and 4 bhk apartments in Greater Noida West. So Destinaire is such a project: by taking what people complete with their dream home search, you get all sorts of amenities.

Hugo Davis said...

Hot water urns at Ian Boer and Boilers are a basic need for any home or business that burns gas. These devices work just like a standard water heater, but they have the capacity to heat more water in a faster rate than a standard appliance.

DevOps Certification said...

Nice content, so much convincing and easy to grasp. Thank you for sharing.

Bewildered said...

Thank you for sharing the information. Power BI Certification will help you to build a strong career in the IT field.

Pankaj Nagla said...
This comment has been removed by the author.
Pankaj Nagla said...

I enjoyed this site. It was very easy to use and functional. Thanks.
DevOps Course

salesforce training said...

The information is so easy to use.

Khushboo's Daries said...

his article is full of informative and knowledgeable courses to know more get into Digital Marketing Course and expand your knowledge

Unknown said...

Thanks for this information.autograph t shirt m&s

Unknown said...

That DM was founded with the aim of assisting everyone in finding solutions to their personal and professional issues.thatdreammeaning

donathill said...

Contact the professionals by dialing the eBay customer service number
Is your eBay down today? Do you need to download eBay app on phone?
Facing problems in accessing eBay account? For this, make sure to avail EBay Customer Service that assures quick rectification. You can call the techies who are capable enough to tackle all the eBay account related technical woes.

Power BI Course said...

Nice content

SAP Analytics Cloud Training said...

Amazing piece of information

ISEL Global said...

Great post !

Check our best six sigma certification courses also.
Green belt certification

ahamed said...

It’s always so sweet and also full of a lot of fun for me personally and my office colleagues to search your blog a minimum of thrice in a week to see the new guidance you have got.
Best AWS Training in Chennai

ahamed said...

Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
Data Science Course in Chennai

AHMED said...

Nice Post.
AWS Course Syllabus

AWS Online Training

AHMED said...

Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.

Machine Learning Online Training

AHMED said...

Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.

Data Science Online Training

zeeshanking6 said...

Adeena's Kitchen is a Restaurant and Takeaway in Croydon. We serve popular and authentic Indian Cuisine to customers from all over the world.

The chef has 30 years of experience especially in Chicken and Mutton Curry, Biryani Dishes and Seafood - all with special herbs and ingredients of Indian cuisine.


5-star rating for food hygiene and safety, air-conditioned with a nice family atmosphere. This Indian restaurant & takeaway is a popular and busy eating place, especially at dinnertime. To join us please Book a Table using our Online Reservation Form.

If you would prefer to enjoy our cuisine at home then you can now Order a Takeout Online. Please visit our Menu page to view our great dishes. Here you can select any day and time up to 7 days in advance to pick up your order from our restaurant.

Whichever way you order, we cannot wait to serve you.


welcome to my visit


wwww.adeenaskitchen.co.uk





SRMS CET said...

Very nice and knowledgeable post.

JanBask Training said...

its a very good content, thanks for sharing. I found some other interview questions listed on google by Janbask training regarding engineering, which is also very informative for us.

Online Shiksha | Online Tuition Classes and Education Tips said...

First of all, I would like to appreciate your efforts towards this piece of blog. This helps me a lot. Keep it up and keep sharing such posts.
After applicable board exams in class 10th, students need to be more focused on their studies. It is said that class 9th is the base of class 10th. Students who have cleared all of the concepts of class 9th, will be able to understand the concepts of class 10th. This is why most of the students take online tuition for class 9 in order to clear all their concepts that could help them in class 10th.
All about Computer: Use of Computer at different Place

charly said...

students who are looking for any writing help. BookMyEssay provides the best Assignment Help in Newcastleat an absolutely low cost.

Get Exam Help Online said...

If you are looking for an effective way to prepare for your upcoming engineering interviews, then Get Exam Help Online. Whether you are seeking help with Civil Engineering Interview Questions, Mechanical Engineering Interview Questions, Electrical Engineering Interview Questions or any other subject matter you can easily get any resources you need.

Donald said...

MCQs preparation for Engineering and Top Interview Questions and Answers are crucial for aspiring engineers. Mastering MCQs helps reinforce knowledge and problem-solving skills, while interview preparation enhances the chances of securing desired positions. A systematic approach, including studying, practice, and seeking guidance, is key to excelling in these areas. By dedicating time and effort, individuals can enhance their prospects and unlock exciting opportunities in the engineering field. Don't forget to visit our website Pay Someone to Take My Online Class

javeria said...

karachi massage center

Muskan said...

I like your way of giving questions with answers for engineering interviews. Also Read: Techniques for Evaluating the User Experience of Software Applications

Hyderabad Laser Dentistry said...

Nice Article

Thanks for sharing with us 🙂

Biological Dentist in Hyderabad

John said...

This very informative and interesting blog

Daniel Willium said...

Nice Blog! Explore Test Evolve's Pinterest platform, where we showcase trending automation testing tools. Stay updated with the latest in test automation technology and elevate your testing game.

Jane Wilson said...

Got an assignment due tomorrow that you're absolutely stumped on? Don't panic! Our Assignment Helpline can help get you through it.
My Assignment Help

Appwars Technologies Pvt. Ltd. said...

Such a impressive content and usefull information about it. I really want to suggest to all that you should read the fairly content. if you want to learn Aws Training in noida, then contact me.

Hema Yadav said...

Very nice blog, Content is very unique and informative. Thanks for posting.
Read my blog: The Role of Testing in Delivering Intuitive User Experiences

ONLEI Technologies said...
This comment has been removed by the author.
Case Study Help said...

Do you need Nursing Case Study Help in Australia? Our PhD expert writer will help you to write assignments with top-quality content, and Case Study help is the only website where you will get 100% plagiarism-free work at the most affordable price.
https://casestudyhelp.net/nursing-case-study-help.php

Case Study Help said...

Are you seeking Marketing Case Study Assignment Help? Get help with Our marketing professionals provide high-quality case study assignment writing with 100% original content at an affordable price. Casestudyhelp.net is available 24/7 for all university students.
https://casestudyhelp.net/marketing-case-study-help.php

CaseStudyHelp said...

I enjoyed your post. Thanks for sharing.

Need Business Law Case Study Help in Australia? Our PhD experts will help you find business law case study assignment writing services with solutions. Get an A+ Grade with 100% plagiarism-free content at pocket-friendly prices.

Free Counselling said...

Love this blog. This website is a fantastic resource of information for students. Please check my blog How to Book a Free Career Counselling Session

Casestudyassignment said...

I enjoyed your post. Thanks for sharing.

Are you looking for Business Law Case Study Help? Casestudyhelp.net helps in business law case study assignments. Our experts assist you with every assessment task at a pocket-friendly price with 100% plagiarism-free content. Get an instant help today!

https://casestudyhelp.net/business-law-case-study-help.php

Blogzify said...

Thank you! I'm glad you found the information amazing
Regard Blogzify

case study help said...

I enjoyed your post. Thanks for sharing.

Get Marketing Case Study Help in Australia? We offer the best marketing assignment answer at casestudyhelp.net. Our expert assist you in all assessment task and get 100% non-plagiarism work at the most affordable price. Get an instant help today.

case study help said...

I enjoyed your post. Thanks for sharing.

Need Marketing Case Study Help with example? Gets high-quality marketing assignments from our professional writers. Our experts provide assessment tasks with 100% non-plagiarism work. Case study help is available 24*7 for all university students.

casestudyhelp said...

I enjoyed your post. Thanks for sharing.

Are you searching for Assignment help near me? You will get expert assignment help near you from casestudyhelp.net. Call us once and get no.1 assignment writing services from PhD experts. We provide live chat customer support service by 24x7 with on-time delivery. Place your order today!

96in said...

The anticipation mounts as hopefuls eagerly await the outcome of the delhi lottery games.

Anonymous said...

This was a wonderful article! Thank you for providing such clear and detailed information on the topic.
pls visit my website:-open car transport