0
I used an OR operator in my if-else statement, I put two integers in the condition separated by ||. Syntax error shows..Why??
So here goes: void getdata(int x, int y) if (x=1 || y=1) { System.out.println("xx") } It is showing a syntax error that this operator does not support int,int..
3 Antworten
0
have you tried System.out.println(x); ?
What language is that? JavaScript, C++, Java?
0
No, I haven't. It was just an example.
0
but what language is that?
If it's Java, you need this:
void getdata(int x, int y)
{
if(x == 1 || y == 1)
{
System.out.println("xx");
}
}