Whats wrong with this statement

Z

zzyzx

What's causing the causing the compile problem. Isn't
dataInputLine.equals( "" ) evaluated to boolean?

dataInputLine is a defined as a String. I compile and get the error
msg. listed below. :-(

If( dataInputLine.equals( "" ) ) // Line 636
{
// Place holder.
}
else
{
// Place holder.
}

C:\WIN\Some.java:636: ';' expected
If( dataInputLine.equals( "" ) )

^
C:\WIN\Some.java:636: cannot resolve symbol
symbol : method If (boolean)
location: class NDCSubjectData
If( dataInputLine.equals( "" ) )

Thanks
 
V

VisionSet

zzyzx said:
What's causing the causing the compile problem. Isn't
dataInputLine.equals( "" ) evaluated to boolean?

dataInputLine is a defined as a String. I compile and get the error
msg. listed below. :-(

If( dataInputLine.equals( "" ) ) // Line 636
{
// Place holder.
}
else
{
// Place holder.
}

C:\WIN\Some.java:636: ';' expected
If( dataInputLine.equals( "" ) )

^
C:\WIN\Some.java:636: cannot resolve symbol
symbol : method If (boolean)
location: class NDCSubjectData
If( dataInputLine.equals( "" ) )

ALWAYS solve the 1st line error from the compiler 1st then recompile, until
more experienced anyway.
But your problem here is the capital 'I' in if, it thinks it's a method.
 
E

Excluded_Middle

zzyzx said:
What's causing the causing the compile problem. Isn't
dataInputLine.equals( "" ) evaluated to boolean?

dataInputLine is a defined as a String. I compile and get the error
msg. listed below. :-(

If( dataInputLine.equals( "" ) ) // Line 636
{
// Place holder.
}
else
{
// Place holder.
}

C:\WIN\Some.java:636: ';' expected
If( dataInputLine.equals( "" ) )

check the statements before and after if and make sure you put ";" to end statments.
^
C:\WIN\Some.java:636: cannot resolve symbol
symbol : method If (boolean)
location: class NDCSubjectData
If( dataInputLine.equals( "" ) )

Thanks

Recompile I think this error is due to previous error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top