Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Tim Cooke
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Liutauras Vilda
Sheriffs:
Rob Spoor
Junilu Lacar
paul wheaton
Saloon Keepers:
Stephan van Hulst
Tim Moores
Tim Holloway
Carey Brown
Scott Selikoff
Bartenders:
Piet Souris
Jj Roberts
fred rosenberger
Forum:
Java in General
Illegal State of Expression Error
Akshit dhar
Greenhorn
Posts: 18
I like...
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Why is the program showing illegal state of expression?
public class StrangeAdvertising { static int value= 2; public static void main(String... ar ){ Scanner sc= new Scanner(System.in); int limit = sc.nextInt(); int startDay =2; Finder(startDay,limit); } public static void Finder(int startDay,int lim) { while(startDay < = lim){ int val= (value*3)/2; value+=val; startDay++; } } }
Love the life you live.
Campbell Ritchie
Marshal
Posts: 75839
361
posted 5 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Please show us which line it is on. We can only help you if we know the full
details
.
I had to compile the code myself. Hint: operators should usually be surrounded by spaces, but must not contain intervening spaces.
Akshit dhar
Greenhorn
Posts: 18
I like...
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Campbell Ritchie. The space was giving the error.
Love the life you live.
Campbell Ritchie
Marshal
Posts: 75839
361
posted 5 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
That's a pleasure
You appear to have posted the same thing twice, but I deleted it.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how do i input
Commandline arg question
Compilation error (waiting for OP to provide better subject)
Armstrong Numbers. Program giving o as output all the time.
help on input character into screen
More...