Java : An platform-independent Programming Language

Java : Prepare Java Interview Questions, Answers, Tips, news, tutorials. Find Java Questions asked in various companies, Get Career advice & Interview Procedures from Java experts

  • Why Introspection is used in Java?
    Advanced Java

    Posted By: clemmiebrotherto

  • What invokes the thread's run() method ?
    Advanced Java

    Posted By: Poornima

  • Explian Autoboxing and unboxing conversions in Java
    Core Java

    Posted By: vijay

  • Why String is immutable in Java?
    Core Java

    Posted By: Smith

  • Explain the difference between a process and a thread?
    Core Java

    Posted By: Wilber

  • How to sort a List of Java Bean in Ascending Order?
    Core Java

    Posted By: CarlosBivatte

  • What are the difference between Java arrays and Collections?
    Core Java

    Posted By: Anonymous

  • How to sort a collection in Java?
    Core Java

    Posted By: Roland

  • What are wrapper classes?
    Core Java

    Posted By: JesseThick

  • List few differences between Array list and vector in Java?
    Core Java

    Posted By: Quincy

  • Why main() method of Java program must be static?
    Core Java

    Posted By: Ella

  • What are access modifiers in java?
    Core Java

    Posted By: Bruce

  • How to create immutable class in java?
    Core Java

    Posted By: Gerhard

  • Give me a real time example of Abstraction?
    Core Java

    Posted By: Caleb

  • What is the Dictionary class?
    Core Java

    Posted By: Guss

  • Can you create an instance of interface?
    Core Java

    Posted By: Wood

  • What is implicit casting in Java?
    Core Java

    Posted By: Ervin

  • What is JIT ?
    Core Java

    Posted By: Allen

  • What does System.gc() and Runtime.gc() methods do?
    Advanced Java

    Posted By: Direct Lender Loans

  • What are Checked and Unchecked exceptions in Java?
    Core Java

    Posted By: Sheldon

  • What is default access modifier of an Interface in Java?
    Core Java

    Posted By: Fifium App Development

  • Why to use Iterator in Java? Is it is an Interface or Class?
    Core Java

    Posted By: Glen

  • What is garbage collector in java?
    Core Java

    Posted By: Curley

  • What is use of transient keyword in Java?
    Core Java

    Posted By: kato

  • How to suspend a thread?
    Core Java

    Posted By: Carson

  • What is deadlock? How can you prevent it, avoid it?
    Core Java

    Posted By: Adolf

  • What is a NullPointerException?
    Core Java

    Posted By: Jasper

  • What is the difference between Iterator and Enumeration in Java?
    Core Java

    Posted By: Ora

  • In how many ways a thread can be created in Java?
    Core Java

    Posted By: Brooks

  • Explain Stream Tokenizer in Java?
    Core Java

    Posted By: Baldwin

  • How to convert a string to long in Java?
    Core Java

    Posted By: uqtifanano

  • How to add and remove nodes in Jtree?
    Core Java

    Posted By: Hans

  • How do I break out of nested loops in Java?
    Core Java

    Posted By: Cas

  • How to calculate difference between two dates in Java?
    Core Java

    Posted By: Cyril

  • What is Double Brace initialization in Java?
    Core Java

    Posted By: Chauncey

  • Why do we need constructor in Java?
    Core Java

    Posted By: Michel

  • How many ways you can create an object in java ?
    Advanced Java

    Posted By: Ram Lakhan

  • How to write custom class Loader ?
    Advanced Java

    Posted By: Kit

  • Explain the difference between ArrayList and Vector?
    Core Java

    Posted By: Valentine

  • How to name a thread in executor service ?
    Advanced Java

    Posted By: Raoul

  • Is there any difference between a = a + b and a += b expressions in Java?
    Core Java

    Posted By: Newton

  • What are raw types in Java?
    Core Java

    Posted By: Milton

  • How to check if a file exists or not in Java?
    Core Java

    Posted By: GORU RAVi

  • How to print nodes of a Binary tree in Java?
    Core Java

    Posted By: Arther

  • What are Inner classes in Java?
    Core Java

    Posted By: Dipali Sharma

  • Is 'sizeof' is a keyword or method in Java?
    Core Java

    Posted By: Joseph

  • Explain What is Connection Pooling?
    Core Java

    Posted By: Wylie

  • What is the default initialized value of a String in Java.
    Core Java

    Posted By: Father

  • What is Static binding ?
    Core Java

    Posted By: Rodney

  • Difference between sleep and suspend ?
    Core Java

    Posted By: MichaeltoX

  • What is JAR file?
    Core Java

    Posted By: Jonathan

  • What is super in Java?
    Core Java

    Posted By: Ethan

  • What is classloader in Java?
    Core Java

    Posted By: Clay

  • What is difference between final, finally and finalize?
    Core Java

    Posted By: Sterling

  • What is Externalizable?
    Core Java

    Posted By: Wilfred

  • What is the difference between JVM and JRE?
    Core Java

    Posted By: Bennett

  • How to interrupt a thread explicitly ?
    Core Java

    Posted By: Willie

  • What is difference between DTO, VO, POJO, JavaBeans?
    Advanced Java

    Posted By: Art

  • How to use JNDI is used in JMS?
    Advanced Java

    Posted By: Stuart

  • List the types of data passing mechanisms?
    Advanced Java

    Posted By: Claudiuslest

  • How to implement RMI in Java
    Advanced Java

    Posted By: bharadwaja

  • What is the use of Semaphore?
    Advanced Java

    Posted By: Patricksic

  • What is difference between core Java and Java EE?
    Core Java

    Posted By: Dan

  • What is runnable?
    Core Java

    Posted By: Charlie Pan

  • What is thread deadlock? How to resolve thread?
    Advanced Java

    Posted By: Carson

  • What is the difference between a StringBuffer and String in Java?
    Core Java

    Posted By: Bert

  • Describe the differences between C++ and Java.
    Core Java

    Posted By: Ambers

  • What is difference between Abstract and final?
    Core Java

    Posted By: akshay anand

  • Why java doesn't support multiple inheritance?
    Core Java

    Posted By: Obed

  • How would you design a garbage collector?
    Core Java

    Posted By: Rajat

  • Does Java support pointer variables?
    Core Java

    Posted By: AnHo

  • How to implement multithreading in Java?
    Core Java

    Posted By: Robertrof

  • What is difference between JVM and JRE?
    Core Java

    Posted By: Alvah

  • What is difference between call by value and call by reference?
    Core Java

    Posted By: Charlie

  • Explain final, finally, finalize difference
    Core Java

    Posted By: Raymond

  • What is the difference between JDK and JVM?
    Core Java

    Posted By: Guadalupe

  • What is overloading and overriding in java?
    Core Java

    Posted By: Daisy

  • What is Enum in Java?
    Core Java

    Posted By: kato

  • What is instanceof keyword?
    Core Java

    Posted By: Burl

  • What is the final method?
    Core Java

    Posted By: Anonymous

  • What is the final blank variable?
    Advanced Java

    Posted By: SamanthaDar

  • What is a transient variable?
    Advanced Java

    Posted By: Larkin

  • When a thread blocks on I/O, in which state it enters?
    Advanced Java

    Posted By: Addie

  • What is the use of % operator?
    Advanced Java

    Posted By: kumar1975

  • What is an immutable class?
    Advanced Java

    Posted By: Leander

  • What is difference between HashMap and HashTable?
    Advanced Java

    Posted By: Stacy

  • What is use of intern() method in Java?
    Advanced Java

    Posted By: Crawford

  • What is JCA and JPA in java?
    Advanced Java

    Posted By: atul

  • What is OutOfMemoryError in Java? How do you deal with that?
    Advanced Java

    Posted By: Nathan

  • What is the maximum Heap Size of 32 bit or 64-bit JVM in Windows and Linux?
    Advanced Java

    Posted By: Delbert

  • What is the difference between JDBC and JNDI?
    Advanced Java

    Posted By: Anonymous

  • What is JAVA_HOME environment variable?
    Core Java

    Posted By: rachelparadis

  • Can we override toString() method for Enum?
    Advanced Java

    Posted By: Houston

  • What is use of ordinal() method in Enum?
    Advanced Java

    Posted By: ociluzexqadii

  • How to convert an String to Enum in Java?
    Advanced Java

    Posted By: PashkevichAcem

  • Is it possible to have multiple public classes in Java ?
    Advanced Java

    Posted By: Isaac

  • What is the difference between object { } block and companion object { } code block in Kotlin?
    Kotlin

    Posted By: Pearl

  • What is the lateinit modifier used for?
    Kotlin

    Posted By: Ajay

    lateinit modifier in Kotlin is used to delay the initialization of a variable.

    The requirement of using lateinit modifier

    • These variables must be declared using var keyword, val is not allowed.
    • Must be either a property inside the body of a class or a top-level property
    • Can only be of non-null type
    • Primitive types disallowed

    Declaration Syntax

    lateinit var myVar: MyObject
    
    

  • What is Elvis Expression in Kotlin?
    Kotlin

    Posted By: Carlos

    The Elvis operator in Kotlin is an operator that receives two inputs and returns the first argument if it is non-null or the second one otherwise. It is fancily called the null-coalescing operator. It is a variant of the ternary operator but for null-safety checking.

    Example

    x ?: y // yields `x` if `x` is not null, `y` otherwise.
    

  • For what vararg keyword in Kotlin used for?
    Kotlin

    Posted By: Woodie

  • ;