This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes convert Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "convert " Watch "convert " New topic
Author

convert

shirsa ray chaudhuri
Greenhorn

Joined: Apr 08, 2008
Posts: 10
int i=(int)c;

where char c='a';

is it write
Ravinder Partap
Greenhorn

Joined: Feb 03, 2008
Posts: 8
this is fine, but you could avoid the explicit casting as its done implecitly while widening 16 bit char to 32 bit int primitive.
int i= (int)c;
is equal to :
int i = c;
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: convert
 
Similar Threads
Comparable again
Get Unicode of a character
Get Ascii value for a character
int []c[] = new int [4][6]; is it a correct syntax ?
int c=1; c=c++; // c is then 1 not 2 !