Hi, we will go through the Java conditional statements in this post. Java supports if and else statements to run code under certain condition(s) to execute if it is a true evaluation or to skip if it is a false evaluation. This is also called Java control flow statements. This makes sense, right? It basicallyContinue reading “If….Else”
Author Archives: 123codingwithme
String & Math Methods
Hello everyone! We will be discussing a very important topic which is String & Math Methods. String Methods In Java variables post, String is defined as one of the most used variables and defined like following; String – text, such as “Hi”. String values need double quotes and String keyword should start with a capitalContinue reading “String & Math Methods”
Java Keywords
Java has keywords which are the words that act like keys for the code. However, please note those cannot be used as variable or class or object names. Those are the special words that need to start with lowercase letters. We have already learnt some of them, such as; class, void, int, … etc. AndContinue reading “Java Keywords”
The structure of Java programming
We talked about variables, operators, user input and static keyword so far for java programming. I hope it gives you a good start. In this post, I would like to give you a brief explanation about the typical structure of Java so you can start connecting part of the puzzles together when we continue learningContinue reading “The structure of Java programming”
Static Keyword
The static keyword is used mainly for memory management. We can apply static keyword with variables, methods, blocks and nested classes (defining a class within another class). Examples; //static variables Static int count; //static method Static void x(){} //static block Static{ //code } //static nested class Class main{ Static class nestedStatic{ } } The staticContinue reading “Static Keyword”
IB Assembly Solo Project
Music has been always a part of my life since 6th grade. I study IB music in 11th grade which gives me more opportunities to learn about different cultures’ music. I was assigned a project to perform a solo music and I selected a classical song named, “To a Wild Rose” by Edward MacDowell. ThisContinue reading “IB Assembly Solo Project”
User Input
Hello everyone to today’s post, I will be writing about my favorite classes in Java, which is the Scanner class. Before we start looking into Scanner class, let’s quickly review why we need class and what is the importance of it in Java programming. Method, function and class Java has a set of code whichContinue reading “User Input”
Operators
Operators, like how we learn on R programming, are used for operations by using variables and values. There are five different operators in Java. The following tables are summarizing the most commonly used ones. Let’s look at some of the examples. You will see written java code and output when you type it into NetBeans;Continue reading “Operators”
Java Unit Conversion
public class NauticalMiles { public static void main(String[] args) { // Declaring and initializing the variables final int NAUTICAL_MILES = 1; final double MILES = 1.15; final double KILOMETERS = 1.852; // Values in nautical miles to convert into miles and also kilometers int NauticalMilesSea1 = 6; int NauticalMilesSea2 = 27; // Converting Sea 1Continue reading “Java Unit Conversion”
Variables
Knowing variables are highly important in Java programming. The purpose of variables is to store data values. Each variable needs to have a unique name to make sure for the allocating of memory. We will learn how to create a variable and key tips to name it in this post, so further when we startContinue reading “Variables”
