Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: Using Constructors that Have Arguments

Java: Using Constructors that Have Arguments
{filelink=11095}

public class ConstructorWithArg
 {
  public static void main(String[] args)
   {
         new TV ("Toshiba","800.000$");
   }
 }
 class TV
 	{
    // Constructor with two arguments
    public TV(String brand, String price)
         {
    System.out.println("TV object created for: "+brand+" "+ price);
         }
   }

Users who found this page were searching for:

  • python string atoi example
  • java program for calculating day of the date using swing
  • how to create buttons in python
  • read data from keyboard by using datainputstream in java
  • sun net ftp ftpclient example
  • perl factorial program
  • python mous event bind
  • python math.pi
  • java program for printing the no of days between two dates
  • tutorial import sun.net.ftp.

No comments yet.

Leave a Comment