Thursday 8 December 2011

class file in java : representation of your data in class file ( try it ) !!


hello friends its cold in ma country and this topic is hot because we are dealing with java { hot-coffee } . see , people think that they can not use or they can not find any-thing from the class file but , i think you can find anything if you are serious for that thing specially in a java program . today i can say that if a person like me who is poor in studies can find some-interesting thing specially in java than any-one in this world can do anything specially in java . an advice from ma side is that , just devote your life to some topic or some fields than seriously you can feel the power of that special field .
today i am just explaining one topic because i just use ma 3-days in only in this topic and still i am not perfect so i think life is not created for being perfect its just created by god to try to be a perfect man . i respect god because he gave me a opportunity to give some-thing special to this earth . and still i am trying for providing some-small things at this level but i am glad because i just make a start , & seriously after some years  i will give more things to this earth .
see now come in a topic , i have a java program here i just enter a string and i am trying to find that how data is represented inside array .

here in image i have just enter a string and trying to find out how it is represented in the class file . for this i am using ” getBytes() ” method by this method your string is converted into the bytes and these bytes are represented and stored into the arr_1 [ ] and i have just printed that data with “Sytem.out.println()”  and see after it you will find the output in the UTF-8 format because inside get-bytes we are using it & the key point is that the UTF-8 format is same as ASCII format because every thing is entered by you from key-board is same as ASCII format thats why in next image i just converted data into hexa-decimal form .

now the interesting thing is that what will be my next step . for this i just use my class file and convert it into hexa-decimal form and in the hexa-decimal form i just find some great type of thing which motvates me and shows that i did it or i use my 3 days in a accurate way .


this image is croped but the main thing resides in this image and i think for me this is enough to explain . so the data in hexa-decimal is present in my class and this is the thing what i am trying to explain you . please try some-other example also , because java is infinite in  terms and in fields .
thanks for reading .


No comments: