Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #3086

error message at compiled time <identifier>expected on line 4 &5.

X-Received by 10.182.27.1 with SMTP id p1mr10006122obg.44.1415375024036; Fri, 07 Nov 2014 07:43:44 -0800 (PST)
X-Received by 10.140.85.228 with SMTP id n91mr17724qgd.21.1415375023965; Fri, 07 Nov 2014 07:43:43 -0800 (PST)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!r10no5133532igi.0!news-out.google.com!u5ni26qab.1!nntp.google.com!u7no3120133qaz.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.java.help
Date Fri, 7 Nov 2014 07:43:43 -0800 (PST)
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=69.163.40.212; posting-account=TnvAbgoAAADYIyXNE98UkP3edYkcUyln
NNTP-Posting-Host 69.163.40.212
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <6fcbfae7-ecb3-4701-bfde-d56f3f82e2f9@googlegroups.com> (permalink)
Subject error message at compiled time <identifier>expected on line 4 &5.
From abiolaquadri1987@gmail.com
Injection-Date Fri, 07 Nov 2014 15:43:43 +0000
Content-Type text/plain; charset=ISO-8859-1
Xref csiph.com comp.lang.java.help:3086

Show key headers only | View raw


public class NestIFElevator {
    public boolean openDoor = false;
    public int currentFloor = 1;
    public Final int TOP_FLOOR = 10;
    public Final int MIN_FLOOR = 1;
    
    public void doorOpen(){
        System.out.println("Opening Door");
        openDoor = true;
        System.out.println("Door is Open");
    }
    public void closeDoor(){
        System.out.println("Closing Door");
        openDoor = false;
        System.out.println("Door is Close");
    }
    public void goUp(){
        System.out.println("Going up 1 floor");
        currentFloor++;
        System.out.println("Floor:" +currentFloor);
        if(currentFloor == TOP_FLOOR){
            System.out.println("Cannot go up");
        }
        else{
            openDoor = true;
            System.out.println("Door is Open");
        }
        public void goDown(){
            
            if(currentFloor == MIN_FLOOR){
                System.out.println("Cannot go down");
            }
            if(currentFloor > MIN_FLOOR){
                if(!openDoor){
                    System.out.println("Going Down 1 Floor.");
                    currentFloor--;
                    System.out.println("Floor:"+currentFloor);
                }
            }
                
            }
        }
        
    

    

Back to comp.lang.java.help | Previous | NextNext in thread | Find similar


Thread

error message at compiled time <identifier>expected on line 4 &5. abiolaquadri1987@gmail.com - 2014-11-07 07:43 -0800
  Re: error message at compiled time <identifier>expected on line 4 &5. Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-11-07 10:50 -0500

csiph-web