Java Tutorials | 99% of JAVA Developers don't know this !!! | by Durga Sir

preview_player
Показать описание
99% of JAVA Developers don't know this !!!
===================================
strictfp modifier

introduced in java 1.2 version

strictfp === strict floating point

applicable for classes and methods but not for variables.

The result of floating point arithmetic is varied from platform to platform

windows-- 3.3333333333333335
linux --- 3.3333333
MAC ---- 3.3333333333334

If we want platform independent results for floating point arithmetic
strictfp modifier.

strictfp method:
---------------
If a method declared as strictfp then all floating point calculations in that method has to follow IEEE 754 standard, so that we will get platform independent results.

windows-- 3.33333
linux --- 3.33333
MAC ---- 3.33333

strictfp class:
---------------
If a class declared as strictfp all concrete methods in that class has to follow IEEE 754 standard, so that we will get platform independent results for floating point arithmetic.

abstract vs strictfp:
--------------------
1. abstract method should not contain implementation. strictfp method should compulsory contains implementation.

abstract-strictfp is illegal for methods.
like abstract-final

2. abstract-strictfp is legal for classes.
Рекомендации по теме
Комментарии
Автор

Hi Durga sir,
Your java classes on youtube really helped me a lot to learn core java when I was joined as a fresher in one of the startups. Currently, I'm working as a Sr. software engineer in one of the reputed company. You're one of the reasons for my career growth. I would like to meet you once.


“Teaching is the one profession that creates all other professions.”


Thanks & Regards,
Bharath SM

bigm
Автор

Java become very easy to us whenever u teach like this, thank you is small word for you really sir hats off ..

rahulpradhan
Автор

Really durga sir... Your a god for java... Every University lo me lanti subject explainer unte... College ki rani students kooda vachi nerchukuntaru... I learn completely java from yours....

shashikumarmacha
Автор

thank you very much sir for this video

saddamahmad
Автор

Sir please make videos on solid principles of java

shivanshbajpai
Автор

sir, can we use strictfp keyword for interfaces?can you please clarify me sir? i saw somewhere else that "strictfp keyword usage for interfaces is legal .if it is legal how it is possible sir?because strictfp keyword definition is not applicable there like if we use that keyword for interface all concrete methods in that interface should follow the def of strictfp.actually there are no methods will be available that should be non-abstract in interface.sir

bhargavimokharala
Автор

Sir, is it necessary to override concrete methods inside the abstract class by its subclass...please clear this sir

thiyagu
Автор

No need of this internal concept. We need to fill customer requirements not internal working...

tamilkumarang
join shbcf.ru