Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Create an array from object
New Posts  All Forums:Forum Nav:

Create an array from object

post #1 of 3
Thread Starter 
There's a method in another class that has a return type of a 2d array.
How would I create a new array by referencing the object method in the other class?

(In Java btw)
    
CPUMotherboardGraphicsRAM
AMD Phenom II X6 1090T Black Edition ASUS M4A89GTD PRO/USB3 XFX HD-577A-ZNFC Radeon HD 5770 G.SKILL 8gb (2x4gb) 1333mhz 
Hard DriveOSMonitorKeyboard
WD Caviar Black WD1002FAEX 1TB 7200 R Windows 7 Home Premium (none yet) Nothing special 
PowerCaseMouse
CORSAIR CMPSU-850TX 850W COOLER MASTER HAF 922 Logitech G700 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD Phenom II X6 1090T Black Edition ASUS M4A89GTD PRO/USB3 XFX HD-577A-ZNFC Radeon HD 5770 G.SKILL 8gb (2x4gb) 1333mhz 
Hard DriveOSMonitorKeyboard
WD Caviar Black WD1002FAEX 1TB 7200 R Windows 7 Home Premium (none yet) Nothing special 
PowerCaseMouse
CORSAIR CMPSU-850TX 850W COOLER MASTER HAF 922 Logitech G700 
  hide details  
Reply
post #2 of 3
Ok let me try write for you and see if this what you want:-
Code:
class A
{
    public int[][] SomeMethod(int[][] Arrary)
    {

        return Arrary;
    }
}

Code:
class B
{
    A a = new A();

    int[][] Array = new int[10][10];

    public void SomeMethod()
    {
        a.SomeMethod(Array);
    }
}

Edited by Fantasy - 10/12/12 at 9:21am
    
CPUMotherboardGraphicsRAM
Intel 3930K 5040MHz @ 1.48 - 1.53v @ VTT/VCCSA ... Asus rampage extreme IV Gigabyte GTX 970 G1 @ 1580/4050MHz @ 1.325V Corsair Vengeance 64GB (8 x 8GB) DDR3 2400MHz. ... 
Hard DriveHard DriveHard DriveHard Drive
Samsung 850 Pro 256GB Seagate Barracuda ST3000DM001 3TB WD Black 1TB 64Mb Cache  WD Blue 500GB 16mb Cache 
Hard DriveOptical DriveCoolingCooling
WD Black 4TB 64mb Cache LG DVD EK-FB KIT RE4 - Acetal EK-FC970 GTX WF3 Backplate - Black 
CoolingCoolingCoolingCooling
Laing D5 Vario 12V DC Pump (MCP 655)  EK-BAY SPIN Reservoir - Plexi EK-CoolStream RAD XT (240) EK-CoolStream RAD XTX (120) 
CoolingCoolingCoolingCooling
EK-CoolStream XE 120 (Single) 8x Corsair Air SP120 PWM High Performance Edition 3x Corsair Air AF120 High Performance Edition EK-Supremacy EVO CPU Water Block (Nickel Acetal) 
CoolingOSMonitorMonitor
EK-FC970 GTX WF3 - Acetal+Nickel Windows 10 64-bit v1511 build 10586.14 BenQ RL2755HM LG W2261 
MonitorKeyboardPowerCase
Samsung S23C350 Razer BlackWidow Ultimate Cooler Master Silent Pro Gold 1000W Thermaltake Level 10 GT 
Mouse
Razer Lachesis 5600DPI 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel 3930K 5040MHz @ 1.48 - 1.53v @ VTT/VCCSA ... Asus rampage extreme IV Gigabyte GTX 970 G1 @ 1580/4050MHz @ 1.325V Corsair Vengeance 64GB (8 x 8GB) DDR3 2400MHz. ... 
Hard DriveHard DriveHard DriveHard Drive
Samsung 850 Pro 256GB Seagate Barracuda ST3000DM001 3TB WD Black 1TB 64Mb Cache  WD Blue 500GB 16mb Cache 
Hard DriveOptical DriveCoolingCooling
WD Black 4TB 64mb Cache LG DVD EK-FB KIT RE4 - Acetal EK-FC970 GTX WF3 Backplate - Black 
CoolingCoolingCoolingCooling
Laing D5 Vario 12V DC Pump (MCP 655)  EK-BAY SPIN Reservoir - Plexi EK-CoolStream RAD XT (240) EK-CoolStream RAD XTX (120) 
CoolingCoolingCoolingCooling
EK-CoolStream XE 120 (Single) 8x Corsair Air SP120 PWM High Performance Edition 3x Corsair Air AF120 High Performance Edition EK-Supremacy EVO CPU Water Block (Nickel Acetal) 
CoolingOSMonitorMonitor
EK-FC970 GTX WF3 - Acetal+Nickel Windows 10 64-bit v1511 build 10586.14 BenQ RL2755HM LG W2261 
MonitorKeyboardPowerCase
Samsung S23C350 Razer BlackWidow Ultimate Cooler Master Silent Pro Gold 1000W Thermaltake Level 10 GT 
Mouse
Razer Lachesis 5600DPI 
  hide details  
Reply
post #3 of 3
EDIT: Oh, there's a slightly better thread on the same problem...
Edited by randomizer - 10/13/12 at 5:00pm
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
i7 920 D0 MSI X58 Pro-E GTX 560 Ti 448 3x2GB G.Skill DDR3-1333 9-9-9-24 
Hard DriveHard DriveOptical DriveOS
840 Pro Caviar Black LG BD-ROM Windows 8.1 Pro x64 
MonitorMonitorKeyboardPower
Dell U2713HM Dell U2311H Turbo-Trak (Google it :D) Corsair HX-520 
CaseMouseMouse PadAudio
CM690 Mionix Avior 7000 Everglide Titan AKG K 242 HD 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Create an array from object