Mindblown: a blog about philosophy.

  • Java break Statement

    In this tutorial, you will learn about the break statement, labeled break statement in Java with the help of examples. While working with loops, it is sometimes desirable to skip some statements inside the loop or terminate the loop immediately without checking the test expression. In such cases, break and continue statements are used. You will learn about the Java…

  • while and do…while Loop

    In this tutorial, we will learn how to use while and do while loop in Java with the help of examples. In computer programming, loops are used to repeat a block of code. For example, if you want to show a message 100 times, then you can use a loop. It’s just a simple example;…

  • For-each Loop

    In this tutorial, we will learn about the Java for-each loop and its difference with for loop with the help of examples. In Java, the for-each loop is used to iterate through elements of arrays and collections (like ArrayList). It is also known as the enhanced for loop. for-each Loop Sytnax The syntax of the Java for-each loop is: Here, array – an…

  • Java for Loop

    In this tutorial, we will learn how to use for loop in Java with the help of examples and we will also learn about the working of Loop in computer programming. In computer programming, loops are used to repeat a block of code. For example, if you want to show a message 100 times, then…

  • Switch Statement

    In this tutorial, you will learn to use the switch statement in Java to control the flow of your program’s execution with the help of examples. The switch statement allows us to execute a block of code among many alternatives. The syntax of the switch statement in Java is: How does the switch-case statement work? The expression is evaluated once and…

  • if…else Statement

    In this tutorial, you will learn about control flow statements using Java if and if…else statements with the help of examples. In programming, we use the if..else statement to run a block of code among more than one alternatives. For example, assigning grades (A, B, C) based on the percentage obtained by a student. if the percentage…

  • Java Comments

    In this tutorial, you will learn about Java comments, why we use them, and how to use comments in right way. In computer programming, comments are a portion of the program that are completely ignored by Java compilers. They are mainly used to help programmers to understand the code. For example, Here, we have used…

  •  Expressions, Statements and Blocks

    In this tutorial, you will learn about Java expressions, Java statements, difference between expression and statement, and Java blocks with the help of examples. In previous chapters, we have used expressions, statements, and blocks without much explaining about them. Now that you know about variables, operators, and literals, it will be easier to understand these…

  • Basic Input and Output

    In this tutorial, you will learn simple ways to display output to users and take input from users in Java. Java Output In Java, you can simply use to send output to standard output (screen). Here, System is a class out is a public static field: it accepts output data. Don’t worry if you don’t understand it. We will discuss class, public,…

  • Java Operators

    In this tutorial, you’ll learn about different types of operators in Java, their syntax and how to use them with the help of examples. Operators are symbols that perform operations on variables and values. For example, + is an operator used for addition, while * is also an operator used for multiplication. Operators in Java can be classified into…

Got any book recommendations?