Top 10 java interview questions.

541 views
426 views

Published on

These are the top 10 java interview questions for interns.

Published in: Education
1 Comment
0 Likes
Statistics
Notes
  • very useful to me.....
    thanks :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total views
541
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
18
Comments
1
Likes
0
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

×