CodeGym University
Learning
Course
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Group
Reviews
About us
Start
Start learning
Start learning now
Articles
Authors
All groups
All Articles List
CodeGym
/
Java Blog
/
Statements in Java
Statements in Java
122 members
Leaderboard
Popular
New
Old
Vasyl Malik
Statements in Java
19 July 2018 11:25
Java Ternary operator
Hi! Today's lesson won't be very long, but it will definitely be useful :) We're going to talk about the so-called ternary operator. Ternary means "composed of three parts". It is an alternative to the if-else control flow statement that you've already met. Let's give an example. Suppose someone decided...
Artem Divertitto
Statements in Java
28 February 2020 11:47
The While Statement
Our very first programs were a sequence of instructions that are executed one after another. No forks. This includes HelloWorld, which displays a greeting. It includes arithmetic calculations. After our first programs, we learned how to branch, i.e. how to make a program perform different actions...
Milan Vucic
Statements in Java
11 August 2022 8:42
Java switch Statement
Imagine that you're a knight stopped at a fork in the road. If you go left, you will lose your horse. If you go right, you will gain knowledge. How would we represent this situation in code? You probably already know that we use constructs like if-then and if-then-else to make these decisions...
John Selawsky
Statements in Java
19 July 2022 13:09
IF ELSE Java Statements
An if else statement in Java is a conditional statement. Java uses conditions just like mathematics, allowing comparisons that yield Boolean results. So you can test inputs to see how they compare to a static set of values that you specify. Because the result is Boolean, there are only two possible results...
Alex Vypirailenko
Statements in Java
9 January 2023 8:51
Unreachable Statement Code Error in Java
An unreachable code statement is a common problem among Java beginners. A lot of novice developers confuse the error with “dead code” - another Java-related phenomenon. Although the two are similar by manifestation, there are some differences which we will cover in this post.
Oleksandr Miadelets
Statements in Java
22 March 2023 9:33
Java Assertions
Assert statement In Java is used to test certain assumptions about the state of a program during execution. This helps to easily detect errors and debug the program. An assertion statement in Java is written using the Java assert keyword followed by a boolean expression...
Please enable JavaScript to continue using this application.