We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

missing import

Ronayne
Ronayne asked
on
Medium Priority
263 Views
Last Modified: 2010-03-31
Hi, im getting this error for a java file, is there something extra I need to import?
Cheers


--------------------Configuration: j2sdk1.4.0_02 <Default>--------------------
C:\output.java:5: 'class' or 'interface' expected
public String output() {
       ^
1 error

Process completed.

Comment
Watch Question

Top Expert 2004
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:

Ah I see, thx
zzynxSr. Software engineer
CERTIFIED EXPERT

Commented:
In your case:

public class Output {

  public Output() { // constructor of your Output class
  }

  public String output() {
     String t = "something";  // as an example
     return t;
  }

}
Top Expert 2004

Commented:
:-)

If you want to learn more about Java :
http://java.sun.com/docs/books/tutorial/index.html
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.