T.Kajavathanan
lk.linkedin.com/in/tkajavathanan/
• Answer
many forms

Overloading
Overriding
• Answer
public methods
Getters
Setters
public int getAge()
{
return age;
}

public void setAge( int newAge)
{
age = newAg...
• Answer
• Answer

Concatenation of String

Concatenation of StringBuffer

String greet=“Hello “;
Greet +=“friend”;

StringBuffer g...
• Answer
• Answer
We can use Final key word for this purpose. Final keyword means we
can’t implement this class anymore. We can use...
• Answer
ArrayList List=new ArrayList();
List.add(“Sunday”);
List.add(“Monday”);
List.add(“Tuesday”);
List.add(“Wednesday”...
static
Public static void main()
• Answer
• Answer
• Answer
Upcoming SlideShare
Loading in …5
×

Top 10 java interview questions.

589 views

Published on

These are the top 10 java interview questions for interns.

Published in: Education
2 Comments
1 Like
Statistics
Notes
No Downloads
Views
Total views
589
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
20
Comments
2
Likes
1
Embeds 0
No embeds

No notes for slide

Top 10 java interview questions.

  1. 1. T.Kajavathanan lk.linkedin.com/in/tkajavathanan/
  2. 2. • Answer many forms Overloading Overriding
  3. 3. • Answer public methods Getters Setters public int getAge() { return age; } public void setAge( int newAge) { age = newAge } assign values
  4. 4. • Answer
  5. 5. • Answer Concatenation of String Concatenation of StringBuffer String greet=“Hello “; Greet +=“friend”; StringBuffer greet=new StringBuffer(“Hello”); greet.append(“ friend”);
  6. 6. • Answer
  7. 7. • Answer We can use Final key word for this purpose. Final keyword means we can’t implement this class anymore. We can use Final key word for class, methods and variables. Final class myClass{ … }
  8. 8. • Answer ArrayList List=new ArrayList(); List.add(“Sunday”); List.add(“Monday”); List.add(“Tuesday”); List.add(“Wednesday”); List.add(“Thursday”); Iterator a=List.iterator(); While(a.hasNext()){ Object myObj=a.next(); System.out.println(myObj+ “ ”); }
  9. 9. static Public static void main() • Answer
  10. 10. • Answer
  11. 11. • Answer

×