More than one class in Java


Here is the simple program for printing more than one class in Java.

Source Code

import java.io.*;
import java.util.Scanner;
class book
{
  public void list()
  {
    System.out.println("C Programming.");
    System.out.println("C++ Programming.");
    System.out.println("Java Programming.");
    System.out.println("C# Programming.");
  }
}
class books
{
   public static void main(String args[])
  {
    book o =new book();
    o.list();
    print();
  }
  public static void print()
  {
    System.out.println("I am Main Class Function ");
  }
}
To download raw file Click Here

Output

C Programming.
C++ Programming.
Java Programming.
C# Programming.
I am Main Class Function 



Learn All in Tamil © Designed & Developed By Tutor Joes