Originally posted by Mohan K:
char c = 0xffff ; // your input stream
long l = 0x00ff & c ;
System.out.println("l = c & 0x00ff: l = " + l); //255
Originally posted by Dave Vick:
hope it helps
Originally posted by wai meng:
Hi All,
Need some help here... I am returning a date field from an oracle query and it returns in the format:
1958-06-11 00:00:00.0
is there a way in java to convert this into 11/06/1958?
Thanks a million!
Cheers,
Wai Meng
Originally posted by Joey Tran:
I need to retrieve value of a final static string in an interface. I don't know the interface name till run time. I cannot load the interface because no class implements the interface. Would you give me some suggestion?
Thanks
Originally posted by Dave Vick:
If I understand correctly you're trying to take the 0xFF value and put it into a byte then later be able to put the byte into a long and get the 0xFF value back out.
Originally posted by Dave Vick:
All of the other bits are lost and can't be reclaimed, that's why you couldn't convert it back and get the value 255 after turning it into a long.
Originally posted by Mikael Jonasson:
Try casting it.
/Mike
Originally posted by Uma Viswanathan:
I tried to execute the program...but i am getting ClassCastException.
Exception in thread "main" java.lang.ClassCastException: java.lang.String
at com.sun.java.util.collections.TreeMap.compare(TreeMap.java:994)
Originally posted by Nathan Pruett:
From what I see two things could be wrong...
- img.jpg doesn't really exist where you say it does... Java will try to load your image, but if it's not there, a null image reference will be used with no complaints.
-Nate
Originally posted by Elizabeth Luckose:
Hi
I am working on a chat program. I am appending the messages to a TextArea in an applet. I want to show the messages in different colors as they are appended to the text area. If I call setForeground for the textarea, the messages already appended to the textarea are changed to the new color. How can I prevent this and show only the message that is appended after calling setForeground()be shown in that color? Is there any other way?
Please help...urgent
Thanks,
Elizabeth