Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compiler error

 
arivu mathi
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can u plz explain why there is a compiler error?

public class Test12{
public static void main(String a[]){
byte b = 100;
Byte b1= new Byte(100);
Byte b2 = new Byte(b);
System.out.println(b1 == b2);
System.out.println(b1.equals(b2));
}
}
What is output?
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
compile time error at Byte b1= new Byte(100);
this one may explain to you.
 
arivu mathi
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot wise...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic