Reserved Keyword In Java Language! | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
+ 2

Reserved Keyword In Java Language!

Below are all the Java language keywords: abstract assert (since Java 1.4) boolean break byte case catch char class const (not used) continue default do double else enum (since Java 5.0) extends final finally float for goto (not used) if implements import instanceof int interface long native new package private protected public return short static strictfp (since Java 1.2) super switch synchronized this throw throws transient try void volatile while

25th Jan 2017, 4:14 PM
ⓤⓝⓢⓜⓐⓡⓣ ⓑⓞⓨ
ⓤⓝⓢⓜⓐⓡⓣ ⓑⓞⓨ - avatar
3 Respuestas
+ 2
Assertion An assertion checks if a condition is true: Code section 3.6: A return statement. public int getAge() { assert age >= 0; return age; } Each assert statement is ended by a semi-colon (;). However, assertions are disabled by default, so you must run the program with the -ea argument in order for assertions to be enabled (java -ea [name of compiled program]).
25th Jan 2017, 5:02 PM
ⓤⓝⓢⓜⓐⓡⓣ ⓑⓞⓨ
ⓤⓝⓢⓜⓐⓡⓣ ⓑⓞⓨ - avatar
+ 2
strictfp is a java keyword, since Java 1.2 . It makes sure that floating point calculations result precisely the same regardless of the underlying operating system and hardware platform, even if more precision could be obtained. This is compatible with the earlier version of Java 1.1 . If you need that use it. Syntax for classes: public strictfp class MyClass { //... } Syntax for methods: public strictfp void method()
25th Jan 2017, 5:05 PM
ⓤⓝⓢⓜⓐⓡⓣ ⓑⓞⓨ
ⓤⓝⓢⓜⓐⓡⓣ ⓑⓞⓨ - avatar
+ 1
what are strictfp and assert used for?
25th Jan 2017, 4:51 PM
Daniel S
Daniel S - avatar