Buscar
Estás en modo de exploración. debe iniciar sesión para usar MEMORY

   Inicia sesión para empezar

level: Interview Questions

Questions and Answers List

level questions: Interview Questions

QuestionAnswer
Collection interface has List, Queue and Set interfaces that extends it. You have ArrayList and LinkedList class implementing List. PriorityQueue class implementing Queue. HashSet and LinkedHashset classes implementing Sethierarchy of collections
Arrays.asList() convert to arrayList. I can use system out on the new list1 or10000 items in an array how to pull them out and use efficiently
.put(key, element) and .get(key)Learn map. How do you put and grab things from map. What is the method.
Super Keyword is used to access methods of the parent class while this is used to access methods of the current class. This and super both kewyords are reference variables that refer to some object of a class. So they both belonga instance of the class. while static method belong to the clas than instance of the class. So static method cant access this and super keyword in javaSuper and This. Can you use This inside a main class.
To break it down. Public means you can call this method outside of the class we are currently in. This is important for Java runtime system which is not located in your current class. Static because when the JVM calls to the main method there is no object existing for the class being called. Void because java is platform independent language and if it will return some value then the value many mean different things to different platforms. Main, the name of the method. The name is fixed and its called by the JVM. String args[] this are arguments of type string that your java application accepts when you run it.The whole (public static void main(String[] args) {)
Static methods belongs to the class rather than object of a class. Static methods can be inoked without create an instance of a class. Static method can access static data memeber and change the value of it.What is Static, and what it means? If you have a static variable in a class can you reference it
sets a = 100, single equal is an assignement operator used to assign the values to the variables.Integer a = 100 and Integer b=100 what is a=b
System – is a final class in java.lang package. Out is a static member field of System Class and is of type PrintStream. Println is a method of PrintStream class.What is System.out.print.ln (in each word)
double equals checks if both objects point to the same memory location where as .equals compares the values in the objects.When do you use double equals and .equals
Java Bytecode and having .class extension. A java class file is created by java compiler from .java files as a result of successful compilation.What are the contents of a class file
For each loop meant for traversing items in a collection.for each and for loop.
JDK is is for development purpose where as JRE is for running java programs. JDK and JRE both contains JVM so that we can run out java application with platform independenceJDK vs JRE vs JVM
Class is a blueprint from which objects are created. Objects is an instance of a class.Class Vs Object
fast fail throws and error when there is threat concurrency issues and fail safe makes sure there is no threat concurrency issues.What is the difference between fail-fast and fail-safe iterators?
Abstraction is hiding implemention using things such as abstract classes and interface. Encapsulation is hiding a way of hiding data from other classes which can be done through access modifiers. polymorphism is the abilty of a object to take on many forms this can be done by using methods from the parent class and overwriting it with its own implementation. Inheretance is the idea of a child class inhereting methods from a parent classOOP Concepts in Java
A singleton class means that only one instance of the class can be created at a time. This is done by setting the contructor as private.What is singleton class in Java and how can we make a class singleton?