File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Char default value - Enthuware question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Char default value - Enthuware question" Watch "Char default value - Enthuware question" New topic
Author

Char default value - Enthuware question

Daniel Martins
Ranch Hand

Joined: Oct 22, 2009
Posts: 45
Hi

This is a question from enthuware:



Char default value is '' ....how does ba[ch] works?

The output is false false...

I do not understand how the ba['default char value'] works...
Punit Singh
Ranch Hand

Joined: Oct 16, 2008
Posts: 952
If you type cast ch to int you will get 0.


SCJP 6
Daniel Martins
Ranch Hand

Joined: Oct 22, 2009
Posts: 45
So you are saying that the array will automatically cast the char to int?

Thanks
Punit Singh
Ranch Hand

Joined: Oct 16, 2008
Posts: 952
Daniel Martins wrote:So you are saying that the array will automatically cast the char to int?

Thanks


Of course, array works on integer argument.
Punit Singh
Ranch Hand

Joined: Oct 16, 2008
Posts: 952
try this one you will have better idea:

Ankur kothari
Ranch Hand

Joined: Sep 06, 2009
Posts: 531
awesome....i love java
 
Don't get me started about those stupid light bulbs.
 
subject: Char default value - Enthuware question