Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
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:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Programmer Certification (OCPJP)
problem in if condition
Madhawi Maurya
Ranch Hand
Posts: 42
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
why it does not compile:
if( true )
char c = 'a';
whereas it compiles the preceeding code in different way:
if( true )
{
char c = 'a';
}
SCJP1.5 with 90%
Amit Ghorpade
Bartender
Posts: 2856
10
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi Madhawi Maurya,
please use code tags for code.
if( true ) char c = 'a';
in the above code, actually you wrote two statements
1 char c
2 c= 'a'
hence the compiler error.
Hope this helps
SCJP, SCWCD.
|
Asking Good Questions
|
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Dereference
assignments and + operator
Beep in Java
Dereferenced Error Code
Casting Problem
More...