Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Core java - Interview Questions and Answers for 'Globallogic' - 3 question(s) found - Order By Newest | ||||
| ||||
Ans. OOPs or Object Oriented Programming is a Programming model which is organized around Objects instead of processes. Instead of a process calling series of processes, this model stresses on communication between objects. Objects that all self sustained, provide security by encapsulating it's members and providing abstracted interfaces over the functions it performs. OOP's facilitate the following features 1. Inheritance for Code Reuse 2. Abstraction for modularity, maintenance and agility 3. Encapsulation for security and protection 4. Polymorphism for flexibility and interfacing | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  oops  oops features Asked in 260 Companies basic   frequent | ||||
Related Questions | ||||
Can you give a real world example of Encapsulation and Abstraction ? | ||||
Which of the following Java feature promotes access protection or Hiding ? a. Inheritance b. Encapsulation c. Abstraction d. Composition | ||||
Define encapsulation in Java ? | ||||
Give an example of how Object Oriented Programming Concepts can be implemented. | ||||
Which of the OOP's features facilitate dependency injection ? | ||||
Which of the OOP's feature - encapsulation or abstraction - is more important ? | ||||
Which of the polymorphism type - static or runtime - is more important ? | ||||
Which of the OOP's feature is most important ? | ||||
Very Frequently asked. Have been asked in HCL Technologies very frequently ( based on 3 feedback ). Among first few questions in many interviews. | ||||
| ||||
Ans. Abstract classes can have both abstract methods ( method declarations ) as well as concrete methods ( inherited to the derived classes ) whereas Interfaces can only have abstract methods ( method declarations ). A class can extend single abstract class whereas it can implement multiple interfaces. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   classes   abstract class   interfaces   abstract class vs interface   abstract classes vs interfaces Asked in 82 Companies basic   frequent | ||||
Related Questions | ||||
What are the different uses of Interfaces in Java ? | ||||
Why can't we have diamond problem with interfaces ? | ||||
Why do we need Thread class even in case we execute thread using runnable interface ? | ||||
What is the difference between List, Set and Map ? or What are the different Java Collections Interfaces ? | ||||
What are Marker Interfaces ? Name few Java marker interfaces ? | ||||
Can we declare interface methods as private ? | ||||
What is comparator interface used for ? | ||||
What is the use of runnable interface if we can always create a new thread using Thread class ? | ||||
Which of the following doesn't extend Collection interface ? | ||||
| ||||
Ans. public void checkIfAnagram(String str1,String str2){ boolean anagram = true; for(char c:str1.toCharArray()){ if(!str2.contains(String.valueOf(c))){ System.out.println("Strings are Anagrams"); anagram = false; } if(anagram == true){ System.out.println("Strings are not Anagrams"); } } } | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve   check if 2 strings are Anagrams Asked in 30 Companies basic   frequent | ||||
Related Questions | ||||
Difference between == and .equals() ? | ||||
Why is String immutable in Java ? | ||||
Explain the scenerios to choose between String , StringBuilder and StringBuffer ? or What is the difference between String , StringBuilder and StringBuffer ? | ||||
What are the difference between composition and inheritance in Java? | ||||
Explain OOPs or Explain OOPs Principles or Explain OOPs Concepts or Explain OOPs features or Tell me something about OOPs | ||||
What is a Lambda Expression ? What's its use ? | ||||
What are different ways to create String Object? Explain. | ||||
Why Char array is preferred over String for storing password? | ||||
Does garbage collection guarantee that a program will not run out of memory? | ||||
What is the difference between final, finally and finalize() ? | ||||