Thursday, 3 November 2011

mujhe pata hai ki tum isko open nai karoge ... phir bhi mere b.tech ke 3 saal ...

yaar mene 12th tak kuch kaam nai kara , siway khelne and chote-chote bacchon ko marne ke , aaj sochta hun ki mein kiss type ka tha yaar  , par kya karu mein tha hi churan type ka insaan ... "sach kahu tho yeh samajhlo ki mein ek jungliee tha ". 

mein 12th mein 72.4 % pake yeh sochne laga ki mene sara sansaar jeet liya ... churan pandi sali , socha aab tho aasaan hai life , AIEEE ka paper diya tho yaaar 5205 rank aayi , ghar wale aa gaye tension mein par mein tha kush ki itni rank aaa kaise gayi ,

who tho accha tha ki chairman sir ne university bana di and mujhe mil gaya admission warna yaar mein kahin almora mein hi dukhan kholke baitha hota yaa hotel mein kaam kar raha hota . aab hua kya ki ek  jungliee type ka insaan aa raha tha b.tech ke liye try marne ...

mene jis din graphic mein kadam rakha tho , sai mein B.tech block dekh-ke maja hi aa gaya yaar , and kaha yaar khuda bas ek baaar andar aa jaun iss clg ke life settel ho jayegi , and khuda ki dua se admission mil gaya yaar .

so 1st sem mein jab mein aaya , mene ladkiyaan dekhi college mein mein chonk gaya yaar , kyonki yaar 12th tho ladkiyoon se deal tak hi nai kari thi , pata bhi nai tha ki ladki chiz kya hoti hai , bachpan mein tho mein ladkiyooon ko peet diya karta tha , clg aaya tho dekha har ladki ek ladke ke sath ... ajeeb type ka feel hua yaar , sai baat hai yaaar , aisa hona ho tha yaaar . and mein B.tech ko lene laga maje mein and last mein aa gayi 57.3 % 3rd lowest inn pure B.tech 1st year batch mein. bade bhai ne mere se kaha ki B.tech karne wala sabse bada chutiya hai , uss din bura lag gaya yaar .

2nd year mein aaya tho chairman sir ko dekha unki knowledge se maja aa gaya yaar , gajab concept clear unke , sai mein sochne laga ki mein bhi iss type ka ban jaataa bhagwaan tho life mast ho jati yaar , sabse gajab baat naye naye dost bane uss time mein I.t branch wale , and bahut jano ke muuh se suna pandey churan hai yaar koi sardaar kehta koi kuch koi kuch , sai baat bhi hai yaar , lekin kaise hota advancement sala B.tech 2nd year mein tho aake pehli blue-film dekhi ( B.F) and pehli baar pata chala ki iss type ki bhi chizen hoti hain . advancement tho door yeh bhi nai pata tha ki intenet kis type ka hota hai yaar ... use hi nai kara tha aaj tak ,  lekin yaaar mast chiz yeh thi ki 3-4 aise logon ke bare mein jana jo katai phaad hai ... sati ( solid dimag ekdum) , vinay ho gaya ( genius ), chauhan ho gaya ( vikat yaar ekdum ) , baajpur ( fadu insaan ekdum ) ho gaya , kamal ( bhai confidence se bhara ekdum + isse tagdi mehnat karne wala insaan nai dekha mene) , and shwetha hai ek class mein bhai uske dimaag + samajh + c ki programming + concept ka fan hun yaar ekdum .

3rd year mein aaaya tho life ekdum sai chal rai thi , and yaar katil scene tho yeh hua ki ek ladki pasand aa gayi yaar and uske baad life thodi ho gayi tough type ki , gajab phat-ti hai yaar usko dekh-ke , naaam tho bata deta uska , lekin yaaar mein tho hun badnaam insaan and mein kisi aur ka naam badnaam nai hone dena chata yaar , and fact tho yeh hai ki naaam type karne mein bhi phat ke hath mein aa jati hai yaar.  badi gajab-gajab type ki dhakkan pandi kara karta tha mein yaaar , but maja aata hai aaj wo churan pandi yaad karke . placement pana jyada aasaan hua yaar , lekin usse baaat karna tho door baat karne ki sochna bhi kahi tough hua yaar placement se. and sabse gajab baat tho yeh jana ki ladki chiz kya hoti hai uski ijaat kaise kari jati hai , chahe wo apki behan ho ya dost ya mammi ... so 3rd year is dedicated to , ladki chiz ko janne ke liye  .

ab and aaj mein hun 4rth year mein ... manta bhi hun ki mein ek hila hua - halkat type ka , thoda pagal type ka , inssaan hun but yaar ... but yaar yeh harkatein iss liy karta hun meri wajah se agar samne wala has jaye tho dil kush ho jata hai yaar , life mein dusrroon ko hasane mein jo maja hai wo katai mast chiz hai yaar . so kabhi kisi ko pagal / churan type / sardar kehne se pehle yeh sochoo ki yaar wo acche se doston ki pyari si hasi pane ke liye churan / sardar / dhakkan pandi karta hai yaar .. but tum nai samjhoge iss maaje ko ...



Monday, 17 October 2011

why there is a problem in NAN { Not a Number } with Java .

If you are new to java than it really helps you because there are somethings which generally looks like error and exceptions and they are . but do you ever think why this error or exception is coming in our program . 


Have you ever deal with NAN { not a number } :- you can say that this is a problem in java if you are "new to java" but if you are learning java from 3-4 months and now you are Java lover like me than you have to read pdf " JAVAHURTS " and when you complete this book after it you can easily say that NAN is created for performance and for user friendly .


generally "if else " is used by all programmer in this world . because i think "if else" is the basic thing for dividing the way . and when we use 


----------------------------
if( ----- )
{
}
else 
{
}
----------------------------


for all of us if is only this , but do you ever tried for which type of things are performed inside machine for implementing the " if else " loop . 


if-else in java performs too many things , there can be two type of things which are related with if-else loop .
so the dividing means comparision is done with some operator like 
 > , == , < , != , >= , =< .
so for me the comparision can be performed between two things or comparision can be performed between only one thing .


: - so there are two things 
-----------------------------------
if( one operand and one operator )
{
}
else
{
}
-----------------------------------
if( two operand and one operator )
{
}
else
{
}
-----------------------------------------------------------------


so different different things are performed between these two .
, lets start with " one operand and one operator "
so in it we have one value . and the comparision is peformed with 0 like


if(n == 0)//( n != 0) etc ...
{
}
else
{
}


so inside this type of code 


Conditional branch: Integer comparison with zero
OpcodeOperand(s)Description
ifeqbranchbyte1, branchbyte2pop int value, if value == 0, branch to offset
ifnebranchbyte1, branchbyte2pop int value, if value != 0, branch to offset
ifltbranchbyte1, branchbyte2pop int value, if value < 0, branch to offset
iflebranchbyte1, branchbyte2pop int value, if value <= 0, branch to offset
ifgtbranchbyte1, branchbyte2pop int value, if value > 0, branch to offset
ifgebranchbyte1, branchbyte2pop int value, if value >= 0, branch to offset



-----------------------------------------------------------------
lets start with " two operand and one operator "
here if-else is performed like


if( a > b ) // ( a == b ) etc ...
{
}
else
{
}




Conditional branch: Comparison of two integers
OpcodeOperand(s)Description
if_icmpeqbranchbyte1, branchbyte2pop int value2 and value1, if value1 == value2, branch to offset
if_icmpnebranchbyte1, branchbyte2pop int value2 and value1, if value1 != value2, branch to offset
if_icmpltbranchbyte1, branchbyte2pop int value2 and value1, if value1 < value2, branch to offset
if_icmplebranchbyte1, branchbyte2pop int value2 and value1, if value1 <= value2, branch to offset
if_icmpgtbranchbyte1, branchbyte2pop int value2 and value1, if value1 > value2, branch to offset
if_icmpgebranchbyte1, branchbyte2pop int value2 and value1, if value1 >= value2, branch to offset





now the topic " because we are cleared with all if-else conditions " 
so NAN in java is occurred  when we deal with floating point . now . perform a operation in if else 


 if (  Math.sqrt(-1) == Math.sqrt(-1) )
 {
 }
 else 
 {
 }


if you are new than you will say yes is the answer means if is followed . but why else is followed in this condition .
so the whole thing is lie in the floating point .


floating point comparision used 2 instruction which are *fcmpg* and *fcmpl* . so if you are doing operation or comparision between two simple float than they both will hold same value means result will occur when they hold same value , means both fcmpg and fcmpl instructions push a 0 if the values are equal, a 1 if the value1 is greater than value2, and a -1 if value1 is less than value2. But if one or both of the values is NaN, the fcmpg instruction pushes a 1, whereas the fcmpl instruction pushes a -1.


but we have a condition where the two instruction will hold different values when any instruction have NAN so thats the reason behind else is followed .
                                          thanks tushar .

Sunday, 16 October 2011

difference between class and instance method initialization .

hello friends i find a topic which looks easy but the concept behind that topic is really beautiful . now how to start with this topic is really interesting for me , because i found some things which really looks different .

so lets start .

JAVA program is built with or created with 2 things . one is class fields , and second is object fields .
so generally we use those methods with the help of object and with the help of class name .
now my question is that how can you access things which are outside from the scope of the method .

just think about what i am saying .

How instance are initialized :-

now take a breath and start , when ever we use object with ( . ) operator at that time how can you access the method . so these type of questions comes in my mind and hurt me the most . but every time i will find a answer for my query .

when ever we create a object at that time we use "new" keyword , and the benefit of the new keyword is that all un-initialized methods are initialized by the new keyword means all methods and all rules ( interfaces ) and all variables are initialized by new keyword . so for initializing is performed in JVM . and this process is performed in constructor . but do you think how the bulky knows about constructor . thats the main thing . because this whole thing is performed in JVM with the machine level instruction and inside machine level and the constructor is known as <init> inside the machine ( JVM )  . so <init> is the instruction behind every instance level initialization and inside <init> this keyword performs its whole process .

How class methods are initialized :- 

now we all know that class methods and instance methods are totally different . but how the class method initialization can be different from instance initialization method . thats the main and pretty interesting thing .
now something will be real different thats why they perform different things in the real world of programming .
now inside every class method or inside every static method we have few instruction like invokestatic , putstatic , getstatic .when ever these types of instruction are found JVM executes <clinit> instruction inside this *cl-init* , "cl" stands for class initialization and whenever this instruction is performed or executed a pretty interesting thing is performed it is known as "the class or interface that declared the resolved field or method is
initialized if it has not been initialized already." from ( jvm specification ) . here resolve methods are those methods which are binded at compile time thats why they are known or called as resolve methods and in java
only static method are binded at compile time so static methods are resolved methods and initialized by <clinit> instruction .

now " we all say that static method can not access instance method directly " so the reason behind this is <clinit> cause .

                                                                                                                      thanks tushar .


how static and instance methods are initialized in JAVA .

hello friends i find a topic which looks easy but the concept behind that topic is really beautiful . now how to start with this topic is really interesting for me , because i found some things which really looks different .

so lets start .

JAVA program is built with or created with 2 things . one is class fields , and second is object fields .
so generally we use those methods with the help of object and with the help of class name .
now my question is that how can you access things which are outside from the scope of the method .

just think about what i am saying .

How instance are initialized :-

now take a breath and start , when ever we use object with ( . ) operator at that time how can you access the method . so these type of questions comes in my mind and hurt me the most . but every time i will find a answer for my query .

when ever we create a object at that time we use "new" keyword , and the benefit of the new keyword is that all un-initialized methods are initialized by the new keyword means all methods and all rules ( interfaces ) and all variables are initialized by new keyword . so for initializing is performed in JVM . and this process is performed in constructor . but do you think how the bulky knows about constructor . thats the main thing . because this whole thing is performed in JVM with the machine level instruction and inside machine level and the constructor is known as <init> inside the machine ( JVM )  . so <init> is the instruction behind every instance level initialization and inside <init> this keyword performs its whole process .

How class methods are initialized :- 

now we all know that class methods and instance methods are totally different . but how the class method initialization can be different from instance initialization method . thats the main and pretty interesting thing .
now something will be real different thats why they perform different things in the real world of programming .
now inside every class method or inside every static method we have few instruction like invokestatic , putstatic , getstatic .when ever these types of instruction are found JVM executes <clinit> instruction inside this *cl-init* , "cl" stands for class initialization and whenever this instruction is performed or executed a pretty interesting thing is performed it is known as "the class or interface that declared the resolved field or method is
initialized if it has not been initialized already." from ( jvm specification ) . here resolve methods are those methods which are binded at compile time thats why they are known or called as resolve methods and in java
only static method are binded at compile time so static methods are resolved methods and initialized by <clinit> instruction .

now " we all say that static method can not access instance method directly " so the reason behind this is <clinit> cause .

                                                                                                                      thanks tushar .