Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Changing a variable in main from a sub method; java
New Posts  All Forums:Forum Nav:

Changing a variable in main from a sub method; java

post #1 of 6
Thread Starter 
Hi, this is a little stack machine program I wrote.
The only thing I can't get to work is if there is no 'HLT' command at the end of the data file supplied to the program, it's supposed to print out "[warning - no HLT instruction]". The problem is, it ALWAYS prints that out because I can't get my executeCurrentInstruction to change the boolean variable in main from false to true. This also causes problems with the while loop in my main().

TL;DR: How change boolean in main() from false to true from within a sub method in the same class?

Thank you! And any criticism on my code is welcome, I'm new at this

EDIT: I'm not sure, but it might be helpful if I actually included my code.

Code:
import java.io.*;
import java.lang.*;
import java.util.*;


public class Proj36527 {

  public static void main(String[] args) {

    boolean halt = false;

    if (args.length < 1) {
      System.out.println("Error: Must supply an argument.");
      System.exit(1);
    }    

    File instructionsFile = new File(args[0]);

    //Header output
    System.out.println("Expression Stack Machine - A. McKibben");
    System.out.println("File: " + instructionsFile);
      System.out.println();

    //Creates a new stack
    Stack<Integer> stackMachine = new Stack<Integer>();

    //Attempts to read and execute instructions from file supplied at command line
    try{
      Scanner instructionScan = new Scanner(instructionsFile);

      while (instructionScan.hasNextLine() && (halt != true)) {
        String [] currentLine = new String[0];
          currentLine = splitCurrentLine(instructionScan, currentLine);
        String currentInstruction = new String();
          currentInstruction = getThisInstruction(instructionScan, currentLine, currentInstruction);
        executeCurrentInstruction(currentInstruction, halt, stackMachine, instructionScan, currentLine);
        }        
      } catch (Exception e) {
        e.printStackTrace();
      }

    if (halt == false) {
      System.out.println("[warning - no HLT instruction]");    
    }
  }

  //Splits the current line
  private static String[] splitCurrentLine(Scanner instructionScan, String[] currentLine) {
    currentLine = instructionScan.nextLine().toUpperCase().split(" ");
    return currentLine;
  }

  //Returns the current instruction
  private static String getThisInstruction(Scanner instructionScan, String[] currentLine, String currentInstruction) {
    currentInstruction = currentLine[0];
    return currentInstruction;
  }

  //Executes current Instruction
  private static void executeCurrentInstruction(String currentInstruction, boolean halt, Stack<Integer> stackMachine, Scanner instructionScan, String[] currentLine) {

    int topOfStack = 0;
    int nextToTop = 0;
    switch (currentInstruction) {
      case "CLR": stackMachine.clear();
                  break;
      case "HLT": halt = true;
                  System.out.println("[machine halted]");
                  //System.exit(1);
                  break;
      case "NEG": topOfStack = stackMachine.pop();
                  topOfStack = (topOfStack * -1);
                  stackMachine.push(topOfStack);
                  break;
      case "ADD": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int sum = (topOfStack + nextToTop);
                  stackMachine.push(sum);
                  break;
      case "SUB": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int difference = (nextToTop - topOfStack);
                  stackMachine.push(difference);
                  break;
      case "MUL": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int product = (nextToTop * topOfStack);
                  stackMachine.push(product);
                  break;
      case "DIV": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  if (topOfStack == 0) {
                    System.out.println("error - division by zero");
                    System.exit(1);
                  }
                  int quotient = (nextToTop/topOfStack);
                  stackMachine.push(quotient);
                  break;
      case "LDC": int constantToLoad = 0;
                  try {
                    constantToLoad = Integer.parseInt(currentLine[1]);
                  } catch (NumberFormatException n) {
                    System.out.println("[warning - illegal command '" + currentLine[0] + " " + currentLine[1] + "' ignored]");
                  }
                  stackMachine.push(constantToLoad);
                  break;
      case "INP": System.out.print("input: ");
                  Scanner kbd = new Scanner(System.in);
                  int kbdInput = 0;
                  try {
                    kbdInput = kbd.nextInt();
                  } catch (InputMismatchException i) {
                    System.out.println("[warning - illegal input ignored]");
                  }
                  stackMachine.push(kbdInput);
                  break;
      case "OUT": topOfStack = stackMachine.pop();
                  System.out.println("output: " + topOfStack);
                  System.out.println();
                  break;
      case "NLN": System.out.println();
                  break;
      case "DBG": System.out.println("DEBUG: " + stackMachine + " (top)");
                  break;
      default:    System.out.println("[warning - no legal commands]");
                  break;
    }
  }
}

Edited by WeirdSexy - 10/9/11 at 7:50am
Core2 Era
(12 items)
 
  
CPUMotherboardGraphicsRAM
E8500 ASUS Rampage Formula x48 Radeon HD 4870 [Sapphire] G.Skill DDR2 
Hard DriveHard DriveHard DriveMonitor
Seagate ES.2 Western Digital Caviar Black Western Digital Caviar Black Samsung T260 
KeyboardPowerCaseMouse
WASD v2 87-Key [Cherry MX Blue] Corsair HX1000 Antec 1200 Logitech G602 
  hide details  
Reply
Core2 Era
(12 items)
 
  
CPUMotherboardGraphicsRAM
E8500 ASUS Rampage Formula x48 Radeon HD 4870 [Sapphire] G.Skill DDR2 
Hard DriveHard DriveHard DriveMonitor
Seagate ES.2 Western Digital Caviar Black Western Digital Caviar Black Samsung T260 
KeyboardPowerCaseMouse
WASD v2 87-Key [Cherry MX Blue] Corsair HX1000 Antec 1200 Logitech G602 
  hide details  
Reply
post #2 of 6
try having executeCurrentInstruction return halt. i made a few changes to your code to try to show you what i mean. changes are in red obviously.

Code:
import java.io.*;
import java.lang.*;
import java.util.*;


public class Proj36527 {

  public static void main(String[] args) {

    boolean halt = false;

    if (args.length < 1) {
      System.out.println("Error: Must supply an argument.");
      System.exit(1);
    }    

    File instructionsFile = new File(args[0]);

    //Header output
    System.out.println("Expression Stack Machine - A. McKibben");
    System.out.println("File: " + instructionsFile);
      System.out.println();

    //Creates a new stack
    Stack<Integer> stackMachine = new Stack<Integer>();

    //Attempts to read and execute instructions from file supplied at command line
    try{
      Scanner instructionScan = new Scanner(instructionsFile);

      while (instructionScan.hasNextLine() && (halt != true)) {
        String [] currentLine = new String[0];
          currentLine = splitCurrentLine(instructionScan, currentLine);
        String currentInstruction = new String();
          currentInstruction = getThisInstruction(instructionScan, currentLine, currentInstruction);
        halt = executeCurrentInstruction(currentInstruction, halt, stackMachine, instructionScan, currentLine);
        }        
      } catch (Exception e) {
        e.printStackTrace();
      }

    if (halt == false) {
      System.out.println("[warning - no HLT instruction]");    
    }
  }

  //Splits the current line
  private static String[] splitCurrentLine(Scanner instructionScan, String[] currentLine) {
    currentLine = instructionScan.nextLine().toUpperCase().split(" ");
    return currentLine;
  }

  //Returns the current instruction
  private static String getThisInstruction(Scanner instructionScan, String[] currentLine, String currentInstruction) {
    currentInstruction = currentLine[0];
    return currentInstruction;
  }

  //Executes current Instruction
  private static boolean executeCurrentInstruction(String currentInstruction, boolean halt, Stack<Integer> stackMachine, Scanner instructionScan, String[] currentLine) {

    int topOfStack = 0;
    int nextToTop = 0;
    switch (currentInstruction) {
      case "CLR": stackMachine.clear();
                  break;
      case "HLT": halt = true;
                  System.out.println("[machine halted]");
                  return halt;
                  //System.exit(1);
                  break;
      case "NEG": topOfStack = stackMachine.pop();
                  topOfStack = (topOfStack * -1);
                  stackMachine.push(topOfStack);
                  break;
      case "ADD": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int sum = (topOfStack + nextToTop);
                  stackMachine.push(sum);
                  break;
      case "SUB": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int difference = (nextToTop - topOfStack);
                  stackMachine.push(difference);
                  break;
      case "MUL": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int product = (nextToTop * topOfStack);
                  stackMachine.push(product);
                  break;
      case "DIV": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  if (topOfStack == 0) {
                    System.out.println("error - division by zero");
                    System.exit(1);
                  }
                  int quotient = (nextToTop/topOfStack);
                  stackMachine.push(quotient);
                  break;
      case "LDC": int constantToLoad = 0;
                  try {
                    constantToLoad = Integer.parseInt(currentLine[1]);
                  } catch (NumberFormatException n) {
                    System.out.println("[warning - illegal command '" + currentLine[0] + " " + currentLine[1] + "' ignored]");
                  }
                  stackMachine.push(constantToLoad);
                  break;
      case "INP": System.out.print("input: ");
                  Scanner kbd = new Scanner(System.in);
                  int kbdInput = 0;
                  try {
                    kbdInput = kbd.nextInt();
                  } catch (InputMismatchException i) {
                    System.out.println("[warning - illegal input ignored]");
                  }
                  stackMachine.push(kbdInput);
                  break;
      case "OUT": topOfStack = stackMachine.pop();
                  System.out.println("output: " + topOfStack);
                  System.out.println();
                  break;
      case "NLN": System.out.println();
                  break;
      case "DBG": System.out.println("DEBUG: " + stackMachine + " (top)");
                  break;
      default:    System.out.println("[warning - no legal commands]");
                  return false;
                  break;
    }
  }
}
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
post #3 of 6
Thread Starter 
Quote:
Originally Posted by travesty View Post
try having executeCurrentInstruction return halt. i made a few changes to your code to try to show you what i mean. changes are in red obviously.

Code:
import java.io.*;
import java.lang.*;
import java.util.*;


public class Proj36527 {

  public static void main(String[] args) {

    boolean halt = false;

    if (args.length < 1) {
      System.out.println("Error: Must supply an argument.");
      System.exit(1);
    }    

    File instructionsFile = new File(args[0]);

    //Header output
    System.out.println("Expression Stack Machine - A. McKibben");
    System.out.println("File: " + instructionsFile);
      System.out.println();

    //Creates a new stack
    Stack<Integer> stackMachine = new Stack<Integer>();

    //Attempts to read and execute instructions from file supplied at command line
    try{
      Scanner instructionScan = new Scanner(instructionsFile);

      while (instructionScan.hasNextLine() && (halt != true)) {
        String [] currentLine = new String[0];
          currentLine = splitCurrentLine(instructionScan, currentLine);
        String currentInstruction = new String();
          currentInstruction = getThisInstruction(instructionScan, currentLine, currentInstruction);
        halt = executeCurrentInstruction(currentInstruction, halt, stackMachine, instructionScan, currentLine);
        }        
      } catch (Exception e) {
        e.printStackTrace();
      }

    if (halt == false) {
      System.out.println("[warning - no HLT instruction]");    
    }
  }

  //Splits the current line
  private static String[] splitCurrentLine(Scanner instructionScan, String[] currentLine) {
    currentLine = instructionScan.nextLine().toUpperCase().split(" ");
    return currentLine;
  }

  //Returns the current instruction
  private static String getThisInstruction(Scanner instructionScan, String[] currentLine, String currentInstruction) {
    currentInstruction = currentLine[0];
    return currentInstruction;
  }

  //Executes current Instruction
  private static boolean executeCurrentInstruction(String currentInstruction, boolean halt, Stack<Integer> stackMachine, Scanner instructionScan, String[] currentLine) {

    int topOfStack = 0;
    int nextToTop = 0;
    switch (currentInstruction) {
      case "CLR": stackMachine.clear();
                  break;
      case "HLT": halt = true;
                  System.out.println("[machine halted]");
                  return halt;
                  //System.exit(1);
                  break;
      case "NEG": topOfStack = stackMachine.pop();
                  topOfStack = (topOfStack * -1);
                  stackMachine.push(topOfStack);
                  break;
      case "ADD": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int sum = (topOfStack + nextToTop);
                  stackMachine.push(sum);
                  break;
      case "SUB": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int difference = (nextToTop - topOfStack);
                  stackMachine.push(difference);
                  break;
      case "MUL": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  int product = (nextToTop * topOfStack);
                  stackMachine.push(product);
                  break;
      case "DIV": topOfStack = stackMachine.pop();
                  nextToTop = stackMachine.pop();
                  if (topOfStack == 0) {
                    System.out.println("error - division by zero");
                    System.exit(1);
                  }
                  int quotient = (nextToTop/topOfStack);
                  stackMachine.push(quotient);
                  break;
      case "LDC": int constantToLoad = 0;
                  try {
                    constantToLoad = Integer.parseInt(currentLine[1]);
                  } catch (NumberFormatException n) {
                    System.out.println("[warning - illegal command '" + currentLine[0] + " " + currentLine[1] + "' ignored]");
                  }
                  stackMachine.push(constantToLoad);
                  break;
      case "INP": System.out.print("input: ");
                  Scanner kbd = new Scanner(System.in);
                  int kbdInput = 0;
                  try {
                    kbdInput = kbd.nextInt();
                  } catch (InputMismatchException i) {
                    System.out.println("[warning - illegal input ignored]");
                  }
                  stackMachine.push(kbdInput);
                  break;
      case "OUT": topOfStack = stackMachine.pop();
                  System.out.println("output: " + topOfStack);
                  System.out.println();
                  break;
      case "NLN": System.out.println();
                  break;
      case "DBG": System.out.println("DEBUG: " + stackMachine + " (top)");
                  break;
      default:    System.out.println("[warning - no legal commands]");
                  return false;
                  break;
    }
  }
}
That didn't work, but it got me thinking of some other things. I'll report back later. Thanks!

EDIT: Nevermind, that actually did work. Thanks! Feels like a hack though, I'm going to try to think of a more logical way to write it... eventually. This will do for now
Edited by WeirdSexy - 10/9/11 at 10:43pm
Core2 Era
(12 items)
 
  
CPUMotherboardGraphicsRAM
E8500 ASUS Rampage Formula x48 Radeon HD 4870 [Sapphire] G.Skill DDR2 
Hard DriveHard DriveHard DriveMonitor
Seagate ES.2 Western Digital Caviar Black Western Digital Caviar Black Samsung T260 
KeyboardPowerCaseMouse
WASD v2 87-Key [Cherry MX Blue] Corsair HX1000 Antec 1200 Logitech G602 
  hide details  
Reply
Core2 Era
(12 items)
 
  
CPUMotherboardGraphicsRAM
E8500 ASUS Rampage Formula x48 Radeon HD 4870 [Sapphire] G.Skill DDR2 
Hard DriveHard DriveHard DriveMonitor
Seagate ES.2 Western Digital Caviar Black Western Digital Caviar Black Samsung T260 
KeyboardPowerCaseMouse
WASD v2 87-Key [Cherry MX Blue] Corsair HX1000 Antec 1200 Logitech G602 
  hide details  
Reply
post #4 of 6
I'm not going to look through your code in detail but rather suggest that you use far more methods and think about what each method is for. Put less in the main method and don't create one giant execute method with a switch-case in it.

Your main method should generally construct and execute an instance of your class, and you should be OO from there.

In your original code, halt is a local variable inside main, and that just makes no sense. This architecture is why it doesn't "feel" right.

What would probably be better is having a StackMachine as its own class, constructing it in main, passing it a sequence of instructions and having methods inside it such as StackMachine.halt(); Even if your execute function is just
case "HLT": this.halt(); break;
and all halt() does is set a protected boolean member that's checked by execute.
Serene Power
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dual Xeon E5620 Supermicro X8DAL-i EVGA 570HD SC 8GiB Corsair DDR3 1333 ECC-R 
Hard DriveOptical DriveOSMonitor
OCZ Agility 3 120GB SSD (+16TB NAS) LG 10x Blu-Ray Windows 7 x64 / Debian x64 Dell 2408WFP, P2411H 
PowerCase
850W CoolerMaster SilentPro M CoolerMaster Cosmos Pure 
  hide details  
Reply
Serene Power
(13 items)
 
  
CPUMotherboardGraphicsRAM
Dual Xeon E5620 Supermicro X8DAL-i EVGA 570HD SC 8GiB Corsair DDR3 1333 ECC-R 
Hard DriveOptical DriveOSMonitor
OCZ Agility 3 120GB SSD (+16TB NAS) LG 10x Blu-Ray Windows 7 x64 / Debian x64 Dell 2408WFP, P2411H 
PowerCase
850W CoolerMaster SilentPro M CoolerMaster Cosmos Pure 
  hide details  
Reply
post #5 of 6
I'm learning JAVA and OOP but as far as I know, you should declare the variable 'halt' outside of the main method (just inside the class). When you declare it inside main, it becomes a local variable and I'm not sure if you want if you want to access it from another method.
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
MacBook Pro 13"
(6 items)
 
 
Desktop
(13 items)
 
CPUGraphicsRAMHard Drive
Intel i5 3210 @ 2.5 GHz Intel HD4000 4 GB DDR3 @ 1600 MHz 500 GB @ 5400 RPM 
OSMonitor
OSX Mountain Lion 13.3" @ 1280 x 800 
CPUGraphicsRAMHard Drive
Intel i5 480m@2.67GHz AMD Radeon Mobility 5650 4GB DDR3 500GB 
OSMonitor
Windows 7 64bit HP 15.6" 1366x768 
CPUMotherboardGraphicsRAM
E7500 Intel...:( MSI GTS250 1GB 2GB 
Hard DriveOSMonitorPower
250GB Windows XP 17" LG CRT 1280x768@85hz 400W 
  hide details  
Reply
post #6 of 6
Quote:
Originally Posted by {Unregistered} View Post
I'm learning JAVA and OOP but as far as I know, you should declare the variable 'halt' outside of the main method (just inside the class). When you declare it inside main, it becomes a local variable and I'm not sure if you want if you want to access it from another method.
if he made halt a class variable, he'd still have to initialize it somewhere. since only main and executeCurrentInstruction use halt, imo its better to just pass halt as a parameter and return value.
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  hide details  
Reply
Fractal Design
(15 items)
 
775 4 life
(15 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7 2600K Biostar TP67XE NVidia GTX 570 Crucial Ballistix 
Hard DriveHard DriveCoolingOS
Crucial C300 RealSSD SDD Samsung F4 2TB Noctua NH-D14 Windows 7 Professional x64 
MonitorMonitorKeyboardPower
Asus VH202T 20'' 1600x900 Acer P244W 24" 1920 x 1080 Apple Keyboard with Numeric Keypad SeaSonic M12II 620W 
CaseMouseAudio
Fractal Design Define XL Titanium Grey Razor Abyssus Creative Sound Blaster X-FI Xtreme Gamer 
CPUMotherboardGraphicsRAM
Intel X3350 3.2Ghz @ 1.25v Gigabyte-GA-P35-DS3L (rev 2) XFX 4870 1GB 4GB OCZ Reaper PC2-6400 
RAMHard DriveHard DriveOptical Drive
2GB Corsair XMS2 PC2-6400 Crucial C300 64GB SSD 2TB Samsung Spinpoint F4 Sony Super Multi 
OSMonitorPowerCase
Windows 7 Professional x64 SP1 Asus VH202T 20'' 1600x900 SeaSonic M12II 620W Cooler Master Centurion 5 
Mouse
Razor Abyssus 
CPUMotherboardGraphicsRAM
Core i5-520M Lenovo 2522BF3 NVIDIA® Quadro® NVS3100M  Ramaxel Technology 4Gb DDR3 
Hard DriveOptical DriveOSMonitor
Samsung SSD 128GB 1.8" Micro SATA  hl-dt-st dvdram gu10n Windows 7 Enterprise (64-bit) 14.1" WXGA (1280x800) display, anti-glare, LED ... 
Power
9-cell plus Slice battery 
  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 › Changing a variable in main from a sub method; java