Core Java Interview Questions
Questions Answers Views Company eMail

What does jenkins do?

490

Explain Linked HashSet

1 746

List methods available in Java Queue interface

1 634

Explain Big-O notation with an example

1 633

10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }

563

What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } } 10. What is the output of the following Java program? class Main { public static void main(String args[]){ final int i; i = 10; System.out.println(i); } }

1 793

Why are strings immutable in Java?

1 646

How to convert string to int in java?

1 659

How to use scanner in java?

1 791

How does a cookie work in Servlets?

355

What the difference is between execute, execute Query, execute Update?

378


Post New Core Java Questions

Un-Answered Questions { Core Java }

What is protected access modifier?

582


What are selection structures?

547


What are the parts of a method?

538


Can we declare a constructor as final?

680


What is <> used for in java?

674






Why do we use return statement?

545


What checkbox method allows you to tell if a checkbox is checked?

546


What is heterogeneous in java?

500


What is dynamic binding(late binding)?

594


Can a class be protected in java?

506


Is stringwriter thread safe?

557


Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)

1351


Explain different types of thread priorities ?

626


What are the elements of java?

567


What are loops in java? What are three types of loops?

552