Results 1 to 2 of 2
Thread: create object from a class
- 10-27-2011, 08:08 PM #1
create object from a class
i have 2 class Block and MiniExcel , MiniExcel class is Constructor .
in MiniExcel Class :
public MiniExcel(int rowNum,int columnNum) is constructor.
rowNum and ColumnNum is size of my 2D array.
i want create an object from MiniExcel Class for using Blocks Of my 2D array in Block Class.
when i use this:
MiniExcel object = new MiniExcel();
it say to me that put your row and column but i want use from rownum and column in my MiniExcel Class not my block Class.
how can use my 2D array Blocks in Block class?
Hope Someone understand me!Last edited by HearT.Hunt3r; 10-27-2011 at 08:17 PM.
- 10-28-2011, 02:46 AM #2
Re: create object from a class
Huh?
The MiniExcel constructor needs 2 int passed to it, row and columns. Regardless of where you create a MiniExcel object (in the Block class or in some other class) you have to pass those int values. So somewhere in the Block class you need to work out what those values are and pass them to the MiniExcel constructor.
Similar Threads
-
Drawing an object in my canvas class, the object is created in a separate class
By Hornfreak in forum AWT / SwingReplies: 3Last Post: 05-02-2011, 04:37 AM -
Insert class file as object in a table & read the object from the blob.
By facemeguru in forum New To JavaReplies: 1Last Post: 02-02-2011, 06:11 PM -
Create object of unknown class, based on existing object
By Zack in forum New To JavaReplies: 2Last Post: 06-22-2010, 04:29 AM -
add object to ArrayList (object is from extends other class)
By mBull in forum Java AppletsReplies: 3Last Post: 03-15-2010, 08:44 PM -
How to create object dynamically with class name known in string format
By ranu_gokhe in forum Advanced JavaReplies: 1Last Post: 04-09-2008, 02:15 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks