Results 1 to 4 of 4

Thread: New with Java

  1. #1
    Rutger is offline Member
    Join Date
    May 2013
    Location
    The Netherlands
    Posts
    2
    Rep Power
    0

    Default New with Java

    I just started to learn Java from a book and got an error after compiling. The error comes from the red line in the code.

    error: 'cannot find symbol'

    Does somebody know how to resolve this?





    /**
    * Write a description of class Bankrekening here.
    *
    * @author (your name)
    * @version (a version number or a date)
    */

    public class Bankrekening
    {
    //Attributen
    private String rekeningnummer;
    private double saldo;

    //Constructor
    public Bankrekening( String nr, double eersteInleg )
    {
    rekeningnummer = nr;
    saldo = eersteInleg;
    }
    //Methoden
    public void print() {
    System.out.printIn( "Rekeningnummer " + rekeningnummer );
    System.out.printIn( "Saldo = " + saldo );
    System.out.printIn( "--------" );
    }
    public double getSaldo()
    {
    return saldo;
    }
    public void stort ( double bedrag )
    {
    saldo += bedrag;
    }
    public double neemOp ( double bedrag )
    {
    saldo -= bedrag;
    return bedrag;
    }
    }

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,988
    Rep Power
    9

    Default Re: New with Java

    It's not printIn(), it's println(). Capital I versus lowercase L. Think PrintLine.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,655
    Blog Entries
    7
    Rep Power
    21

    Default Re: New with Java

    That line reads 'printIn' instead of 'println' (a lower case ell instead of an upper case I).

    kind regards,

    Jos

    edit: darn, the slowest old sod again ...
    cenosillicaphobia: the fear for an empty beer glass

  4. #4
    Rutger is offline Member
    Join Date
    May 2013
    Location
    The Netherlands
    Posts
    2
    Rep Power
    0

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •