Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Java IQ

Java Interview Questions

QuestionAnswer
Static keyword in Java belongs to class and can be called with class name
differences between String and StringBuilder String is not changeable and StringBuilder is changeable
Encapsulation making variables private and giving them access through getters and setters
difference between this and this() this calls variables and methods of same class this() calls constructor of the same class
difference between array and arraylist array is fixed size, does not have methods, and works with any data type ArrayList is resizable, has methods and works with only reference type of data
method overloading methods having same name with different parameters
JDK, JRE, and JVM JDK-Java Development Kit JRE- Java Runtime Environment JVM - Java Virtual Machine
autoboxing and unboxing autoboxing- converting primitive to wrapper class unboxing - converting wrapper class to primitive
method overriding when child class gives different implementation for part class's method
private keyword access modifier that restricts access to outside classes and can only be declared in the same class
inheritance where child class inherits another class which is called parent class, and it inherits variables and methods from parent to child class
main two elements of java instance variables and methods
.toString() and why override it converts a number to a string, when overriding developers customize the way an object is represented
type of variables Primitive: byte, short, int, double, boolean, char Reference: String, StringBuilder, List
static block initialize static variables once we are creating an object, execute only once
interface an abstract data type that defines a list of abstract public methods
difference between method and constructor method is a collection of statements which return value upon execution constructor is a block of code that initializes a newly created object
why constructor is needed used to initialize instance variables of object while object is being created
difference between class and object class is a template for declaring and creating objects object is an instance of a class
constructive overloading allows a class to have multiple constructors with different parameters
polymorphism where object can take many forms(references)
static method belongs to class and can be called with class name
class variable static keyword
what methods can static method call any other static method within the same or different class
why we need "this" keyword calls variables and methods of same class
OOP concepts of Java Encapsulation: making variables private and giving them access through getters and setters Inheritance: where child class inherits another class which is called parent class, and it inherits variables and methods from parent to child class
OOP concepts of Java Abstraction: hiding method implementation Abstract Class: Partial abstraction Interface: full abstraction Polymorphism: where object can take many forms(references)
difference between this and super keyword this calls variables and methods of the same class super calls super class's variables and methods
final keyword cannot be initialized, overridden, or inherited
Static and Dynamic Polymorphism Dynamic Polymorphism points to different method at compile time and calls the overridden method at run time Static calls the method during compile time
difference between protected and default access modifiers protected restricts visibility to child classes default is private practice access
Garbage collector to clean unused objects inside heap memory
access modifiers public, protected, default, private
default keyword acts as a fallback or "else" condition within the switch construct
difference between Abstract class and Interface Abstract class hides the method body while Interface allows multiple inheritance
Concrete class complete implementation of all its methods, cannot have abstract methods and can be instantiated which means create objects in class using "new"
key word we use to inherit interface from class implements
which class does the class inherit by default Object Class
what methods cannot be overridden final, static, private and constructor methods
difference between method overloading and method overriding method overloading means the method name should be the same, parameters should be different, and the return type can be any method overriding access modifier should be the same, return type should be the same or covariant, signature should match
how many classes a class can inherit only one parent class, but as many children classes
difference between LinkedList and ArrayList Arraylist: can only act as a list, store and manage ordered data LinkedList: can be both a list and a queue
differences between List, Set, Map list: collection that maintains a linear order of elements set: collection that does not allow duplicate elements map: collection that associates keys with values
difference between HashMap and TreeMap HashMap: stores key-value pairs TreeMap: provides advantage of maintaining sorted order
Exception types Unchecked: occurs at runtime, optional to handle Checked: show compilation error at compile time, required to handle
how to handle exceptions try catch block: try the code that might throw an exception and catch the code that is executed when execution happens - declaring in method signature: mostly applied for checked exceptions, it will throw it even if declared in method signature
finally keyword block being executed even if we do or don't have exception in try block, to close connection with external files or database
Runtime exception superclass that exceptions are thrown during the normal operation of JVM
Error class subclass of Throwable that indicates serious problems that a reasonable application should not try to catch
static block whenever static keyword is used and associated to block
difference between super and this keyword super is used to refer only to parent's constructor this is used to call current class constructor
Created by: tsvete21
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards