tipical program in java

Hello CEans,
can you please make me understand with this program how this will be executed?
class HexByte
{
public static void main(String args[])
{
char hex[]={'0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f',};
byte b=(byte)0xf1;
System.out.println("b=0x"+hex[(b>>4)&0x0f]+hex[b&0x0f]);
}
}

Replies

You are reading an archived discussion.

Related Posts

Name: lakk *Engineering Trade: Computer Science *Occupation: (Student) *Hobbies & Interests: surfing net, learning new things, collecting toys *Aim in life to scale great heights..would tell that in due course.....
Hello there, I want to make some electronics for my car. I am not sure which components I should buy, so I hope you could suggest some solutions 😀 Thanks....
The definition for wedding dance differs from place to place and from country to country. However, very few cultures in the world do follow this concept. Cultural artists define it...
Guys, I am in 3rd year electrical branch. After few days Tata steel is visiting our college for interns. Can anyone suggest me few topics i should study. Thanx in...
Hello everyone. I just joined. I THINK this the correct forum category for this and if not please correct me. I'm more of a mechanics guy and know a little...