User Profile

Collapse

Profile Sidebar

Collapse
JavaJon
JavaJon
Last Activity: Mar 14 '09, 11:48 PM
Joined: Mar 14 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • JavaJon
    started a topic non-static variable error ( simple )
    in Java

    non-static variable error ( simple )

    The problem in the follow code occurs when trying to instantiate an array object.

    Code:
    public class Main {
    
        /**
         * @param args the command line arguments
         */
        public static void main(String[] args) {
    
            Room[] rooms;
            rooms = new Room[5];
    
            rooms[0] = new Room( 3, 7, true);
    /* non-static variable this cannot be referenced from
    ...
    See more | Go to post

  • JavaJon
    started a topic declaring a var inside a loop
    in Java

    declaring a var inside a loop

    Hello, I'm Jon.

    I've recently picked up Java after using a "gimmick" programming language called GML ( Game Maker Language ). I've read a lot of tutorials and even a Java for Dummies *.pdf book. The basics are similar to what I'm accustomed to but there's still some confusion.

    I'm currently playing around with how the static, public, protected etc things work and I stumbled upon a problem.

    In the following...
    See more | Go to post
    Last edited by pbmods; Mar 14 '09, 09:52 PM. Reason: Added CODE tags.
No activity results to display
Show More
Working...