Types of the Java Output
The Output of Computer Programming (not exclusively inwards Java) basically four types,
1) Value based Result (Fixed)
2) Boolean / Logical Result (true/false)
3) Constant based Result
4) Dynamic Result
-----------------------------
1) Value based Result (Fixed)
Arithmetic Operators together with roughly predefined methods provide this type of Value based Result...
Example:
System.out.println(10+3);//13
System.out.println(5*6); //30
System.out.println(Math.max(10, 7));//10
-----------------------------
2) Boolean / Logical Result (true/false)
Relational / Comparison Operators provide boolean Results, together with roughly predefined methods provide this type of Result
Example:
System.out.println(100<99);//false
System.out.println(100>99);//true
System.out.println("ABC".equals("abc"));//false
System.out.println("JAVA".equals("JAVA"));//true
-----------------------------
3) Constant based Result (Output)
Java Returns Constant based Result inwards 3-way comparing of Numbers
Result Criteria,
i) if number1 < number2 hence -1
ii) if number1 = number2 hence 0
iii) if number1 > number2 hence 1
----------
Example:
int a=7;
Integer x=a;
System.out.println(x.compareTo(9));//-1
System.out.println(x.compareTo(7));//0
System.out.println(x.compareTo(4));//1
-----------------------------
4) Dynamic Results (Output)
i) Generating Random Numbers...
ii) Returning arrangement Date....
---------------------
Example:
//Generate Random Number
System.out.println(Math.random());
//Return System date
Date appointment = novel Date();
System.out.println(date);
-----------------------------
The Output of Computer Programming (not exclusively inwards Java) basically four types,
1) Value based Result (Fixed)
2) Boolean / Logical Result (true/false)
3) Constant based Result
4) Dynamic Result
-----------------------------
1) Value based Result (Fixed)
Arithmetic Operators together with roughly predefined methods provide this type of Value based Result...
Example:
System.out.println(10+3);//13
System.out.println(5*6); //30
System.out.println(Math.max(10, 7));//10
-----------------------------
2) Boolean / Logical Result (true/false)
Relational / Comparison Operators provide boolean Results, together with roughly predefined methods provide this type of Result
Example:
System.out.println(100<99);//false
System.out.println(100>99);//true
System.out.println("ABC".equals("abc"));//false
System.out.println("JAVA".equals("JAVA"));//true
-----------------------------
3) Constant based Result (Output)
Java Returns Constant based Result inwards 3-way comparing of Numbers
Result Criteria,
i) if number1 < number2 hence -1
ii) if number1 = number2 hence 0
iii) if number1 > number2 hence 1
----------
Example:
int a=7;
Integer x=a;
System.out.println(x.compareTo(9));//-1
System.out.println(x.compareTo(7));//0
System.out.println(x.compareTo(4));//1
-----------------------------
4) Dynamic Results (Output)
i) Generating Random Numbers...
ii) Returning arrangement Date....
---------------------
Example:
//Generate Random Number
System.out.println(Math.random());
//Return System date
Date appointment = novel Date();
System.out.println(date);
-----------------------------