Home >Java >javaTutorial >book task
public class Book {
public static void main(String[] args) { // TODO Auto-generated method stub Book physics = new Book(); physics.read(100); } public void read(int page) { System.out.println("No. of Pages " + page); }
}
public class Reader {
public static void main(String[] args)
{
Book physics = new Book();
physics.read(100);
}
}
out put ---No. of Pages 100
The above is the detailed content of book task. For more information, please follow other related articles on the PHP Chinese website!