各位大神帮帮忙!
小弟初学Java,看一个程序,真不懂什么意思。。。。public class Book_Practice
{
private String author;
private String title;
private int pages;
private String refNumber;
public Book_Practice(String bookAuthor,String bookTitle,int pages)
{
author=bookAuthor;
title=bookTitle;
this.pages=pages;
this.refnumber=0;
}
public void printAuthor()
{
System.out.println(author);
}
public void printTitle()
{
System.out.println(title);
}
public int getPages()
{
return pages;
}
public void printDetails()
{
if(strlen(refnumber)!=0)
{
System.out.println("书名:"+title",作者:"+author",页数:"+pages+"签名"+refnubmer");
}
}
public void setRefnumber(String ref)
{
refNumber=ref;
}
public int getRefnumber()
{
return refNumber;
}
public void borrowBook()
{
}
}
public后面的作用是什么?还有get和return? --------------------编程问答-------------------- 买本Java入门的书看吧,来论坛扫盲对你自己来说效率太低了,不值得。 --------------------编程问答-------------------- 不知道楼主要看它干嘛?先学习走路吧,别想马上就跑起来。
补充:Java , Java相关