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 3 of 3

Thread: Class, Interface, or Enum expected

  1. #1
    Junior Member
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Class, Interface, or Enum expected

    Hi, I'm brand new to the community and Java. Wondering what it means, do not understand what is wrong. In bold is the part being flagged by BlueJ as incorrect.

    /**
    * Constructor for objects of class House
    */
    public String name()
    {
    address = "Address";
    beds = 0;
    owner = "homeOwner";

    Thank you for the help!

    -SilvioSpeed


  2. #2
    Junior Member
    Join Date
    Oct 2012
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Class, Interface, or Enum expected

    Nice to see 20 odd people view a topic but don't help. Really dedicated community, wanting to help out the newbies.

    Thanks a bunch.

  3. #3
    Member
    Join Date
    Jan 2012
    Location
    Hellas
    Posts
    284
    Thanks
    11
    Thanked 59 Times in 57 Posts

    Default Re: Class, Interface, or Enum expected

    Hello SilvioSpeed!

    Quote Originally Posted by SilvioSpeed View Post
    Nice to see 20 odd people view a topic but don't help. Really dedicated community, wanting to help out the newbies.

    Thanks a bunch.
    You waited two hours before you post again an offending comment about people not helping you. Everybody here is offering their spare time. What did you do to help them help you? You didn't even read the forum rules before posting. Also have in mind that many are searching for Unanswered threads. By posting again you got excluded from this category.

    Anyway please read the forum rules and then provide more information about your problem. My only guess (coming from post#1) is that you have forgotten to close a {, but that is just a guess. Please post the whole code of your class.

    Hope this helps.

Similar Threads

  1. class,interface, or enum expected?
    By Eimaj in forum What's Wrong With My Code?
    Replies: 21
    Last Post: September 28th, 2012, 04:16 PM
  2. enum class creation to hold time on android
    By jobsfind39 in forum Object Oriented Programming
    Replies: 3
    Last Post: June 21st, 2012, 11:04 AM
  3. [SOLVED] Error: Class,interface or enum expected
    By FJIW in forum What's Wrong With My Code?
    Replies: 10
    Last Post: September 18th, 2011, 04:08 PM
  4. .'class' expected - what to do?!?! URGENT
    By Rads23 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: August 17th, 2011, 07:05 PM
  5. Trouble using enum in constructor when creating a class
    By willmer in forum What's Wrong With My Code?
    Replies: 3
    Last Post: July 13th, 2011, 11:48 AM