Results 1 to 3 of 3
Thread: Logical Operator error
- 10-11-2011, 11:29 AM #1
Member
- Join Date
- Sep 2011
- Location
- Sale, Cheshire
- Posts
- 10
- Rep Power
- 0
Logical Operator error
Hi,
I'm trying to compile a program but I get the error: 'Unclosed string literal' but I am using the " in a while loop so it's not actually quotation marks I'm using the " as the logical operator OR.
Any idea why it will not compile?
The actual code i'm using is: while(choice == '\n' " choice == '\r');
Thanks
Martin.
- 10-11-2011, 12:11 PM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,606
- Blog Entries
- 7
- Rep Power
- 17
Re: Logical Operator error
The logical or operator is || (two vertical bars) not a double quote.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
- 10-11-2011, 12:29 PM #3
Member
- Join Date
- Sep 2011
- Location
- Sale, Cheshire
- Posts
- 10
- Rep Power
- 0
Similar Threads
-
Logical Operator query
By aconti in forum New To JavaReplies: 5Last Post: 08-19-2011, 10:38 AM -
My program has a logical error but i cant find problem
By s0meb0dy in forum New To JavaReplies: 3Last Post: 09-26-2010, 06:29 AM -
> Operator cannot be applied error and return incompatible types error
By corney_16 in forum New To JavaReplies: 1Last Post: 03-10-2010, 01:53 PM -
Some Logical problem
By MuslimCoder in forum New To JavaReplies: 4Last Post: 03-01-2010, 08:12 AM -
Error Message: operator * cannot be applied to java.lang.String, int
By MICHAELABICK in forum Java AppletsReplies: 4Last Post: 11-27-2008, 06:09 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks