Types of Output in Java Programming

Types of Output in Java Programming, Value bases Result in Java, Boolean Result in Java, Constant based Result in Java, and Dynamic Result in Java.

Java Input and Output Operations

  • Read user input
  • Read data from files
  • Write program output on the console
  • Write data or output in files

Types of Output/Result in Java

The Output of Computer Programming (not only in 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 and some predefined methods return this type of Value-based Result.

System.out.println(5*6); //30

System.out.println(Math.max(10, 7));//10

2. Boolean / Logical Result (true/false)

Relational / Comparison Operators return Boolean Results, and some predefined methods return this type of Result




3. Constant based Result (Output)

Java Returns Constant based Result in 3-way comparison of Numbers

Result Criteria,
i) if number1 < number2 then -1
ii) if number1 = number2 then 0
iii) if number1 > number2 then 1

int a=7;
Integer x=a;


4. Dynamic Results (Output)

i) Generating Random Numbers…
ii) Returning system Date….
//Generate Random Number

//Return System date
Date date = new Date();

Java Step by Step Tutorial

Java Videos

Java Language Syllabus

1. Introduction to Java Programming

2. Java Installation and Environment Setup

3. Java Keywords and Identifiers

4. Java Basic Syntax

5. Java Program Structure

6. Comments in Java

7. Access and Non Access Modifiers in Java

8. Java Data Types

9. Java Variables

10. Java Operators

11. Java Decision Making Statements

12. Java Loop Statements

13. Java Branching Statements

14. Java Strings

15. Arrays in Java

16. Java ArrayList

17. Java Read User Input

18. File Handling in Java

19. Java User Defined Methods

20. Java Built-in Methods

21. Exception Handling in Java

22. Java Object-Oriented Programming

23. Java Inheritance

24. Polymorphism in Java

25. Abstraction in Java

Follow me on social media:

Leave a Comment