Tuesday, 11 October 2011

method overloading is another worse part of java ...

for me java is best language but i want to say a quote that " Java need patience " thats true if you want to become master in Java

and explore your knowledge ... i choose this easy topic because i think 30% people in this world or more than 30% people thinks and live with satisfaction but i do not want to waste my life with satisfaction .... so for me satisfaction is the key to success

now my topic is .... i totally disagree with method overloading ...and i make those type of codes which never uses the case where overloading is performed

now why overloading is worth .. or useless take a look and just dip on it ...
java is built for man ... means for human environment ...
now took "+" operator in java ...
and add 2+3 = 5 ok i am happy with it ..
now add "what"+"game" = "whatgame" ...
now think how ... "+" operator can add a thing which is totally different ...  no relation in human's life ..
now what i want to say  totally different ... so if anyone say that ... creating code is good or our seniors says that hey gentleman create a code for this this this ..  and you or i am happy that we are using or just creating codes for just your program ...

but i am not a developer and i love java it is like my parents ... so i abuse my parents by doing wrong tasks ...
so  "+" operator hurts java .... and a another factor ... for java poorness ...

so please work like a efficient or a genius for Java ...



Sunday, 9 October 2011

every time compiler delete unused stacks why ?

every time when machine starts it create stacks and every time when we switch off our machine ( JVM ) it deletes all its stacks .

yes what are you thinking for the answer of this question is true .. that memory allocated for that for program should be deleted ... i will say yes but take a case :

create a for loop :-
int i ;
for( i = 0 ; i < 100 ; i ++ )
{
  ;
}

now for this program think how much memory is allocated .
in your mind you are thinking that not too much just some addressing because , starting address is stored
or a return address for this program ... yaa thats true in your sense ...

but compiler is too different from our sense because it has to create something which is accepted by machine .
now think like a compiler and dream how much memory will allocate if each instruction takes 2 byte ....
please think ... think ... think ... because when you think your mind makes some move and increases your level .

if i say that this program will take minimum ------ bytes than you will say that how ...
but this is true .... because every time a instruction is loaded from frame and stored into operand stack ... so two instruction is used for only 1 value and every time the old value is fetched from operand stack and every time it is incremented and loaded back into operand stack than 3 instruction is used for still one operation
so minimum 10 bytes which is allocated to 1 instruction and there are total 100 instruction and task are performed and total 1000 bytes means 1kb memory only for a for loop .... wow ( i love it )

now i think this is enough for finding why stack is deleted and for me and for compiler 1 kb is enough but not for you ,,, so please spent your sometime in machine representation because every time you will find something great which will make you different from others .

and learn more and google more because life is not only for fun you are here for doing something not for wasting your rime ...

Big endian representation is the reason behind java's platform independency

we all know that java is famous for platform independency , but do you ever think that how a machine or just a software can be a reason for some thing ... so in JVM there is something pretty interesting which create JVM as platform independent language ...

" so please find something in this world which gives you some confidence and proves you as a engineer . "

i tried my best and i am true to 70-80 % but still i am a learner and still i am working  .
now in java  , JVM is every thing so , inside JVM there is a endianship , which is representation of any thing ... but this is a heavy thing to understand  ...

now first understand what is language-text and data 

language-text is like "i love my nature" means  " human is saying that he loves his nature " , there is a meaning of this thing , and please write this text without any sense "i l o v e m y n a t u r e" dont consider the meaning of this text now read it ... will you understand the text ... and my answer is no ...

take another example "|0" understand it 
:- |0 - can be - 10
:- |0 - can be - io (input output)
:- |0 - can be - I/O ( input output devices)

we have three things which are related to |0 now how we differentiate between these three ...
and the answer is , there must be some interpreter which will make sense or will understand it means interpreter which makes a sense that |0 is for io and is for 10 ...

and the same case is also followed in case of java's class file .
now for this we have a compiler or interpreter which makes class file for java program ...
now think in class file ... arrange your class file according to your mind and arrange the data "tushar" in hexadecimal form .
                             tushar --- 0xtu 0xsh 0xar { only for your understanding }
and some another person will arrange this name as
                             tushar --- 0xsh 0xtu 0xar { only for your understanding }

now think when machine will understand this code or when resources are allocated to this data then what will happen ... machine will understand this thing differently and perform those task which are never expected from machine ... now now now the problem is in machine so surely there will be solution ...

so for this you have to create something from where you will get some definite thing which can be easily understandable by any machine because our machine is also is typical type of thing means all follow different things ...

than what type of things they are ...
see what is published or provided to machine is never accepted in the same way ... means we generally add things from left to right but machine accepts those things from right to left ...

now the time is to understand what is endian representation ... 
two types of endian in representation ..
big-endian 
little-endian 

java uses big-endian but why , because java or class file highly depend upon representation 
because JVM heavily depend upon storage and debugging and by endian representaion we provide these two things easily .

but sorry i can only explain .. endian representation because i can not find any thing related to debugger and i can not work for debugging in ma machine .

but please now look at memory storage
use big-endian for representing 0x1234 
0x34 --- will store at 0 address
0x12 --- will store at 1 address 
but why because the higher order bit is stored in base ..

but in little endian 0x1234 
0x12 is stored in 0 address
0x34 is stores in 1 address 

so thats why 123400 and 1234 and 12340000 is equal numbers in little endian 
but in big-endian they all are different 
because big-endian believe in strictness or in restrictness ...

so class file is built from or used big-endian representation ... for strict storage and restrictness of memory .
now JVM who will understand this data ... 
means when ever we will compile our program ... we get a constant thing means that thing is represented by big-endian ... and now any jvm or any machine can understand it ... because jvm is also built from big-endian representation ... 

" so i simple words BIG-ENDIAN representation is the reason behind java's platform independency "

     

Friday, 7 October 2011

how next instruction is fetched in your machine ...

for me the most beautiful thing in this world is machine ( computer machine ) ... i hate girls because i love machine ... thats my opinion and i love when i live with my opinion .



Wednesday, 5 October 2011

machine language difference between abstract and interface

please closed your book and take a dip in this and surely you will find something different ....