Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Noob Question

  1. #1
    Member
    Join Date
    Oct 2012
    Posts
    61
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Noob Question

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;

    public class MyCard
    { private boolean treeLit = False;
    private JButton treeLitButton = new JButton("Turn Lights On");
    private JButton treeNotLitButton = new JButton("Turn Lights Off");


    public MyCard()
    { setTitle("Hello there");


    Can anyone tell me why 'False' and 'NewTitle' are showing as an error?


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Noob Question

    showing as an error?
    When getting errors, please copy the full text of the error messages and post it.

    Java is case sensitive. Check the spelling.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member
    Join Date
    Oct 2012
    Posts
    61
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default Re: Noob Question

    java: cannot find symbol
    symbol: variable False
    location: class MyCard

    java: cannot find symbol
    symbol: method setTitle(java.lang.String)
    location: class MyCard

    --- Update ---

    I have fixed the 'False' error, just the 'setTitle' one to fix now.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,042
    Thanks
    63
    Thanked 2,708 Times in 2,658 Posts

    Default Re: Noob Question

    The compiler gives the cannot find symbol error message when it can not find a definition for the symbol given in the error message.

    Where is the variable: False defined?
    Where is the method: setTitle defined in the MyCard class?
    The compiler can not find their definitions.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Most noob question ever.
    By SkyAphid in forum Java Theory & Questions
    Replies: 1
    Last Post: December 8th, 2011, 08:14 AM
  2. Total NOOB question
    By coolidge in forum Java Theory & Questions
    Replies: 3
    Last Post: September 2nd, 2011, 04:09 PM
  3. Noob question: Why .class?
    By Shaybay92 in forum Java Theory & Questions
    Replies: 10
    Last Post: August 22nd, 2011, 04:56 AM
  4. "The import ___ cannot be resolved" (stupid noob question)
    By RobG in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 18th, 2010, 03:09 PM
  5. noob question on abstract classes
    By joshred in forum Object Oriented Programming
    Replies: 1
    Last Post: September 15th, 2010, 06:27 PM