Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

ENCODING / DECODING

  Asked By: Fern    Date: Jul 31    Category: Java    Views: 781
  

can anybody showme how to encode and decode char to binary
digits using trees and treeNodes

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Devrim Yilmaz     Answered On: Jul 31

char c='a';

byte bytevalue=(byte)c;

char charvalue=(char)bytevalue;

byte mask1=1; //0000 0001
byte mask2=2; //0000 0010

byte firstdigit= mask1&bytevalue;
byte seconddigit= mask2&bytevalue;

so what was the problem?

 
Answer #2    Answered By: Ella Brown     Answered On: Jul 31

dude that would have been so useful if it came like 2 days ago!!!!

 
Didn't find what you were looking for? Find more on ENCODING / DECODING Or get search suggestion and latest updates.




Tagged: