Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cannot resolve symbol error

 
Jared Knowlton
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting the cannot resolve symbol error and I checked that the Caps match throughout and that the Brackets and braces are all matched up.
Code follows:
public class Authenticator
{
public static void main(String args[])
{
System.out.println();
System.out.print("Username: ");
String username=DummiesIO.getString();
System.out.print("Password: ");
String password=DummiesIO.getString();
System.out.println();
if (
(username.equals("bburd") &&
password.equals("swordfish")) ||
(username.equals("hritter") &&
password.equals("preakston"))
)
System.out.println("You're in.");
else
System.out.println("Sorry, pal. You can't log in.");
System.out.println();
}
}
 
Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't give you a line number? And how's DummiesIO (interestingly named class) fit? I'm assuming its got a public static method called getString, and that DummiesIO is either in the same package as your class, or that you have an import statement that you're not showing in your code sample?
 
Jared Knowlton
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I figured it out. I made sure that the DummiesIO.java file was in the same folder as the file I was running.
 
Onion rings are vegetable donuts. Taste this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!