public class Book {
private String title;
private int pageNum;
private String type;
public Book(String title, int pageNum, String type) {
this.title = title;
this.pageNum = pageNum;
this.type = type;
}
public void detail()
{
System.out.println(this.title+","+this.pageNum+","+this.type);
}
}
public class BookTest
{
public static void main(String[] args) {
Book book = new Book("java编程",190,"计算机");
book.detail();
}
}