Inner class error

Posted on 2006-04-23
Last Modified: 2006-11-18
I type the following in eclipse, and it complains on the syntax error "Syntax error on token "class", invalid Type ", how to correct it?
public class MyClass {
      private class MyInnerClass(){

Question by:william007
    LVL 86

    Accepted Solution

    >>private class MyInnerClass(){

    should be

    private class MyInnerClass {
    LVL 30

    Assisted Solution

    LVL 23

    Assisted Solution

    LVL 9

    Author Comment

    LVL 86

    Expert Comment


    Featured Post

    Gigs: Get Your Project Delivered by an Expert

    Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    java JDK Download 7 49
    mapShare challenge 13 41
    wordappend challenge 8 51
    JAVA part two 5 18
    For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Video by: Michael
    Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now