Java - Interview Questions and Answers for 'Program' | Search Java Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com
Share

Search Java Interview Questions


 2137 questions in repository.
 There are more than 200 unanswered questions.
Click here and help us by providing the answer.
Label / Company      Label / Company / Text

   



Interview Questions and Answers for 'Program' - 17 question(s) found - Order By Newest

 Q1. Why Java is not considered pure OOP's language ?Core Java

Ans. There are 2 reasons for it.

1. Usage of Primitive types - Though Java provides classes for the primitive data types but as the usage of primitives is permissible, its considered unpure OOP's language.

2. Usage of Static members - Static members belong to the class and not objects and hence not considered fit for pure OOP's programming.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     oops  object oriented programming  object oriented language  primitive data types     BSL Information Technology  Data64


 Q2. Difference between C++ and Java ?Core Java
Admin
info@buggybread.com
Ans. Java does not support pointers.

Java does not support multiple inheritances.

Java does not support destructors but rather adds a finalize() method. Finalize methods are invoked by the garbage collector prior to reclaiming the memory occupied by the object, which has the finalize() method.

Java does not include structures or unions because the traditional data structures are implemented as an object oriented framework.

C++ compiles to machine language , when Java compiles to byte code .

In C++ the programmer needs to worry about freeing the allocated memory , where in Java the Garbage Collector takes care of the the unneeded / unused variables.

Java is platform independent language but c++ is depends upon operating system.

Java uses compiler and interpreter both and in c++ their is only compiler.

C++ supports operator overloading whereas Java doesn't.

Internet support is built-in Java but not in C++. However c++ has support for socket programming which can be used.

Java does not support header file, include library files just like C++ .Java use import to include different Classes and methods.

There is no goto statement in Java.

There is no scope resolution operator :: in Java. It has . using which we can qualify classes with the namespace they came from.

Java is pass by value whereas C++ is both pass by value and pass by reference.

Java Enums are objects instead of int values in C++

C++ programs runs as native executable machine code for the target and hence more near to hardware whereas Java program runs in a virtual machine.

C++ was designed mainly for systems programming, extending the C programming language whereas Java was created initially to support network computing.

C++ allows low-level addressing of data. You can manipulate machine addresses to look at anything you want. Java access is controlled.

C++ has several addressing operators . * & -> where Java has only one: the .

We can create our own package in Java(set of classes) but not in c and c++.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   c++   difference between java and c++   programming concepts   programming languages   architecture   technical architect   technical lead     Intuit


 Q3. What is race condition ?Operating System
Admin
info@buggybread.com
Ans. A source of possible errors in parallel programming, where one thread can cause an error in another thread by changing some aspect of the state of the program that the second thread is depending on (such as the value of variable).

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java.threads   multithreading   race condition   parallel programming   synchronization   ebay   concurrency     ISB Vietnam  NetSpend  Polycom  Cerner  NVIDIA  US Bank  Amadeus  McKesson  Hulu  Neelkanth Digital


 Q4. What is a Listener ?Design
Anonymous
Ans. In GUI programming, an object that can be registered to be notified when events of some given type occur. The object is said to listener? for the events.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   gui   ui programming   swing   awt   swt   listener   architecture


 Q5. Define Network Programming?
Admin
info@buggybread.com
Ans. It refers to writing programs that execute across multiple devices (computers), in which the devices are all connected to each other using a network.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   network programming   distributed computing   architecture


 Q6. What are the advantages and Disadvantages of Sockets ?
Admin
info@buggybread.com
Ans. Sockets are flexible and sufficient. Efficient socket based programming can be easily implemented for general communications. It cause low network traffic.

Socket based communications allows only to send packets of raw data between applications. Both the client-side and server-side have to provide mechanisms to make the data useful in any way.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   network programming   distributed computing   sockets   architecture


 Q7. Difference between TCP and UDP ?
Admin
info@buggybread.com
Ans. http://www.cyberciti.biz/faq/key-differences-between-tcp-and-udp-protocols/

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java   network programming   at&t   architecture


 Q8. Have you ever had any conflict with the team member (like disagreement on some design decision ) and How you reacted to it ? General2016-11-30 15:55:39

Ans. [Open Ended Answer]

This is a very sensitive question and should be dealt with caution. Just simply saying that you never had any disagreement will present you as dumb team member. Showing your self as too aggressive in such decisions will present you as a trouble maker. You should present a situation where you had an argument / disagreement but eventually you and your team mates mutually found a way out of it.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve          Elsevier  Overstock.com  EPAM  InContact  Liberty Mutual Insurance  Principal Financial Group  FedEx  McKesson   ITHAKA  Incture Technologies  Ciena  Capgemini  Programmation  Hewlett Packard (HP)  United Health Group (UHG)  Delta Air Lines   ResMed  TD Ameritrade  Vistana  The Bank of New York Mellon (BNY Mellon)      basic


 Q9. Find the repeating number using O(n) time and constant space.Algorithm

Ans. http://www.geeksforgeeks.org/find-duplicates-in-on-time-and-constant-extra-space/

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     algorithm   program   code   coding  makemytrip.com



Do you think these are the Best Java Frameworks ?

OpenXavaSPRING MVCApache StripesCheck everything
that is Best in Java

Click Here



 Q10. Can I run a java program without creating any class ?2016-07-18 11:09:58

Ans. No, It requires creation of atleast one Class. Creating an object of that class is not compulsory as we can write all our logic within main method which is static.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     java program without creating any class


 Q11. Write a Java Program to check Armstrong Number ?Core Java2016-11-24 08:40:05

Ans. http://www.programmingsimplified.com/java/source-code/java-program-armstrong-number

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     program  code  coding  armstrong number     IBM


 Q12. Write a Program to print the positive and negative numbers separetlyCore Java2016-12-18 16:53:56

 This question was recently asked at 'Infoview Technologies'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     code  program  coding     Infoview Technologies


 Q13. Is exit a keyword in Java ?Core Java2017-01-12 11:21:28

Ans. No exit is a method to exit execution of a program.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     exit  keywords  exit a program     HCL Technologies


 Q14. How would you explain the statement "Java Programs are collection of objects" ?Core Java2017-06-08 07:24:57

Ans. Java Programs are collection of objects that communicates with each other to get a task accomplished. To add to those objects, there are common spaces ( static i.e common for objects belonging to a class ) that are used too.

We can visualize objects as departments of an organization in real world. Just like Task gets initiated in one department and then files are moved across different departments to get work done. In a similar fashion, a task is initiated in one object ( having main method ) and then information ( through POJOs / DTOs ) is moved across objects to accomplish a task.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     objects  Java Programs are collection of objects  real life example of object communication


 Q15. Write a method, that compare two numbers and return the bigger one ?Core Java2017-06-11 12:36:13

 This question was recently asked at 'NetStar Inc'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     code  program  coding     NetStar Inc      basic


 Q16. Write a Program for insertion sort.Core Java2017-06-12 07:50:44

 This question was recently asked at 'Ola Cabs'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     program  code  coding  insertion sort   sort     Ola Cabs


 Q17. What are the different types of advices in AOP ?Spring2017-06-23 11:54:01

 This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like      Discuss      Correct / Improve     spring app  spring  aspect oriented programming




Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus
 

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked:
         

X Close this

6 person from are looking for questions for 'Program'. Connect with them to better prepare for your interview.Click here and post a message

X Close this

Help Us Improve.
Please share your
interview experience.

Company Name:   


Questions Asked: