Avatar of gudii9
gudii9Flag for United States of America

asked on 

code issue

package SuperThis;
public class Sub extends Super {
	/*public static void main(String[] args) {
		  super.bar();
	      this.bar();
	}*/
    public void bar() {
        System.out.println("Sub.bar()...");
    }
 
 
    public void test() {
       super.bar();
       this.bar();
    }
  
    	// Sub sub=new Sub();
    	 //   sub.test();
    
        this.test();
}

Open in new window

why above code is not working
i see error as below at line 21,15
Syntax error, insert "}" to complete ClassBody

Please advise
System ProgrammingProgramming.NET ProgrammingJavaProgramming Languages-Other

Avatar of undefined
Last Comment
Owen Rubin
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of Owen Rubin
Owen Rubin
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
EXPERT CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of Owen Rubin
Owen Rubin
Flag of United States of America image

Damn, missed that myself. Good catch girionis.
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo