• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to fix the code  RSS feed

 
Nick Mourousias
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 3 classes listed below:





and


and now im going to compile them by typing javac GameLauncher.java
and i get these errors
 
Liutauras Vilda
Sheriff
Posts: 4926
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this line first:

I think you used 11 instead ||.

[edit] actually you used ll (lower LL).
 
Nick Mourousias
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no men i typed ll (like LL BUT NO IN CAPITALS)
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick Mourousias wrote:
and now im going to compile them by typing javac GameLauncher.java
and i get these errors


You used the wrong characters when you copied the code. This is why it is better to do a cut-n-paste, than to re-type the code (which I assumed was what was done here). It is a logical OR (meaning two vertical bars) and not two lower case L's.

Henry
 
Liutauras Vilda
Sheriff
Posts: 4926
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick Mourousias wrote:no men i typed ll (like LL BUT NO IN CAPITALS)

So, why did you do that? This is where at least 1 your mistake is.
 
Nick Mourousias
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to type 2 vertical bars im a beginner.
 
Liutauras Vilda
Sheriff
Posts: 4926
334
BSD
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick Mourousias wrote:how to type 2 vertical bars im a beginner.
you should look them on your keyboard. It can differ from keyboard to keyboard where exactly it is located.
Also, since you're beginner, you could go through this Oracle tutorial (<- link to click on) and start by reading from the very beginning, so you could understand the basics.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nick Mourousias wrote:how to type 2 vertical bars im a beginner.


Well, that would depend on your keyboard right? For example, on my keyboard, it is a shift backslash, which is the key above the enter key.

Henry
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To type a vertical bar use Shift + \.

This might be different on a keyboard layout different than mine. I'm not sure.

You can read about the character here.
 
Nick Mourousias
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you a lot no problems at all now it was just shift + \
THANK U.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!