View Single Post
  #1 (permalink)  
Old 04-30-2008, 10:34 PM
Javanoob828282 Javanoob828282 is offline
Member
 
Join Date: Apr 2008
Posts: 1
Javanoob828282 is on a distinguished road
Array Constructor
I am trying to write code for a class that has a 40element array in it and i want to use the 2nd set of code to just input the numbers and print it out for now. I have to do a bunch with the ints later but i cannot figure out how to write the constructor.
I am not sure if I have given enough information for someone to help, but I do not know what else to do. I have spents hours looking at this. Thanks for your help.


public class HugeInteger
{
//Instance Variables
int[] hugeArray=new int [41];
//constructor
HugeInteger(
{

}//End Constructor
}//End Class

*************************
{
public static void main(String args[])
{
// smaller numbers
HugeInteger i = new HugeInteger(9999);
HugeInteger j = new HugeInteger(1);
HugeInteger k = new HugeInteger(-9999);
HugeInteger l = new HugeInteger(-1);

System.out.println(i);
}
}
Reply With Quote
Sponsored Links