0

(EDIT)I not to sure what is going on. I believe everything is right but I'm not sure. I am trying to create an object but when I compile it reads 'symbol cannot be found'

public class State{
    public static void main(String[]args){

    something hh = new something();
    hh.you();
    }
 }

And:

public class something{

    void you(){
    System.out.println("asdfasdfa");
    }
}

These are the errors that pop up

State.java:6: error: cannot find symbol
    something hh = new something();
    ^
    symbol:   class something
    location: class State

State.java:6: error: cannot find symbol
    something hh = new something();
                       ^
    symbol:   class something
    location: class State
2 errors
Charlie
  • 11
  • 3
  • If they're not in the same package, the `here` class and `you` method need to be `public`. Please post your full error message(s). – shmosel Mar 09 '17 at 23:32
  • If you need help debugging an compiler error, it would help immensely if you posted the full text of the compiler's error message. – Hovercraft Full Of Eels Mar 09 '17 at 23:34
  • 1
    *What* symbol cannot be found? Also don't name your classes same as standard Java classes. You may end up with problem like one described here: http://stackoverflow.com/questions/17462795/cant-use-scanner-class-constructor-is-undefined-method-is-undefined – Pshemo Mar 09 '17 at 23:34

0 Answers0