Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CheckBox()  RSS feed

 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import java.awt.*;
import java.applet.*;

public class first extends Applet{

CheckBox chk=new CheckBox();


public void init(){
add(Chk);


}

}


Dear sir in the above code , genrating compile time error like that

Can't resolve Symble Class CheckBox Location first?
why? Although i m using jdk1.3 and name of constructor is absolute right then why sir why???
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Capitalization of classes, methods and fields matters in Java - there is no class called CheckBox, only one called Checkbox.
 
Arun Maalik
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks sir actualy it is given n my book that CheckBox(); I have understood.

Arun kumar maalik
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to let the publisher know about this, so that it can be corrected in the next printing of the book.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!