Showing posts with label Java-tutorial-series. Show all posts
Showing posts with label Java-tutorial-series. Show all posts

28 February 2022

Understanding variable scope in Java

Welcome to another tutorial on the "How to code in Java" tutorial series. In the last tutorial, we've gone through how pass by value and pass-by-reference works in Java. In this tutorial, we'll be going through how variable scope works in Java. This would be a rather short article, so sit back and enjoy. 

2 December 2020

Pass by value and pass-by-reference in Java. How do they work?

Welcome to another tutorial on the “How to code in Java” tutorial series. In the last tutorial, we’ve gone through on how static class members and constant variable works. In this tutorial, we’ll be going through on how passing-by-value and passing-by-references work in Java.

30 October 2020

Constant variable, static fields and static methods. How they work and how to use them.

Welcome to another tutorial on the "How to code in Java" tutorial series. In the previous tutorial, we've gone through on how to access modifier works while going through the different type of it and how to use each of them correctly. In this tutorial, we'll be looking into what are constant variable, static fields and static methods. 

17 October 2020

What is access modifier in Java?

Welcome to another tutorial on the "How to code in Java" tutorial series. In the last tutorial, we have gone through on how to use a constructor to initialize an object. In this tutorial, we will be looking at how Access Modifier works and how to use them correctly.

13 October 2020

What is a constructor in Java?

Welcome to another tutorial on the "How to code in Java" tutorial series. In the previous tutorial, we have gone through classes and objects. In this tutorial, we'll be continuing on what is a constructor and how we can utilise it in our code. This tutorial is the continuing of the previous tutorial, it'll be much easier to follow through this tutorial if you've read it. So I if you can't follow along in this tutorial, please have a read on the previous tutorial

9 October 2020

Classes and Objects in Java.

Welcome to another tutorial for the "How to code in Java" tutorial series. In the last tutorial, we have gone through on the basic concept of object-oriented programming. In this tutorial, we'll be diving deeper into classes and object by demonstrating how to use classes and objects in Java. Without further ado, let's get started.

4 October 2020

Introduction to Object-Oriented Programming concept

Welcome to another tutorial on the "How to code in Java" tutorial series. In the last tutorial, we have gone through with what methods are in Java. In this tutorial, we will be continuing with the concept of Object-Oriented Programming, OOP. As this tutorial is aimed for beginners, we won't be going into too deep on the concept, just scratching the surface of the OOP concept would be enough for the moment.

29 September 2020

What methods are in Java? (A more in-depth tutorial)

Welcome to another tutorial on the "How to code in Java" tutorial series. In the last tutorial, we learned about how type-casting work and when to use them. In this tutorial, we'll be learning what methods are, how to use them and when to use them. Since everything in Java is represented in the form of objects, Java doesn't have "functions" like some other programming language. Instead, Java has only methods. 

24 September 2020

How type-casting works in Java.


Welcome to another tutorial on the "How to code in Java" tutorial series. In the last tutorial, we have gone through on what arrays are and how to use them. In this tutorial, we'll be going through on how type casting works in Java. Because there are many different types of data types in a programming language. Sometimes you will find yourself in a situation where the variables or values are not compatible with each other while assigning the values into a variable. That's when type-casting help us to solve the problem for us.

21 September 2020

How Arrays work in Java?

Welcome to another tutorial on the the "How to code in Java" tutorial series. In the last tutorial, we have gone through on how loops work in Java. In this tutorial, we'll be going through how arrays work in Java. I would recommend you to read on how loops work first as we'll be needing some knowledge on them. Now, let's get started with arrays.

15 September 2020

What are loops in Java?

Welcome to another tutorial on the "How to code in Java" tutorial series. In the previous tutorial, I explained how we can take the user's input from the terminal using the Scanner class. While in this tutorial, we'll be going through on how loops work in Java. There're many different types of loops in programming, the commons one are for loop, while loop, do-while loop and enhanced for loop (Java only has this four types of loops). This tutorial won't be covering the enhanced for-loop of Java because it requires some knowledge of arrays to be understandable.

11 September 2020

How to get user input in Java?


Welcome back to another tutorial on the "How to code in Java" tutorial series. In the last tutorial, I explained what conditional statements are and how are they used. If you haven't read it, feel free to read it since you might learn something new by reading it. In this tutorial, we'll be going through how to get the user's input from the terminal in Java. I'll be showing you how to quickly get the user's input from the terminal using a class's object along with its method to get different types of input. If you don't know what method, class or object is, please read my other tutorial for a quick explanation.

28 August 2020

How conditional statements work in Java?


Welcome back to another tutorial for the "How to code in Java" tutorial series. In the previous tutorial, we learned about bitwise operators. In this tutorial, we'll be learning about conditional statements. We'll learn about what is conditional statements, the different type of it and how can we use them. So let's begin.

22 August 2020

How bit-wise operators work in Java?


Welcome to another tutorial on the "How to code in Java" tutorial series. In the previous tutorial, I write about the relational, shorthand and logical operators in programming. In this tutorial, I'll continue with another type of important operator in programming. That is the bitwise operators. One thing that I would recommend you doing first before reading this tutorial is to understand the basic of the binary number system.

16 August 2020

What is relational, shorthand and logical operators in Java?


In the last tutorial, you've learned how to do math in Java (using arithmetic operators). Now, in this tutorial, you'll learn about relational, shorthand and logical operators. Since this tutorial is part of the "How to code in Java" tutorial series, I'll be using Java to demonstrate the operator's functionality. Most of the programming language use the same operators for these operations; therefore, you can implement the knowledge that you've gotten here with another programming language. 

20 July 2020

How to do math in Java

Welcome to another tutorial on my "How To Code In Java" tutorial series. In the last tutorial, we went through the different ways of printing outputs in Java. In this tutorial, I'll be showing you how to do some maths in Java. I'll explain to you what's the symbol used for mathematics operation as well as the operator precedence. You'll also be learning about Java's "Math" class and variable value increment and decrement. 

16 July 2020

Different ways of printing output in Java

Welcome to another tutorial on my "How To Code In Java" tutorial series. In the last tutorial, I explained about what variable is. In this tutorial, you'll be learning about the different ways in printing output in Java. You'll also learn when to use them and how to utilise them. Now, let's begin.

12 June 2020

What is a variable in Java?


Welcome to another tutorial from our "How To Code In Java" tutorial series. In the last tutorial, you have learned how to write your very first Java program. In this tutorial, you'll be learning about what's a variable and the different types of it. The basic terminology used for the variable as well as the rules when naming a variable. Since this is a tutorial series on Java, I'll be using Java syntax to explain the topics covered in this tutorial. Other programming languages won't have many differences in their concept, so don't worry much about it. So, let's begin.

29 May 2020

Writing Your First "Hello World" Program in Java


Welcome to the fourth tutorial of the "How to Code in Java" tutorial series. In the previous tutorial, I guided you on how to setup Java and an IDE. In this tutorial, I'll be guiding you on how to write your first "Hello world" program in Java and running it using Netbeans IDE.

7 May 2020

How To Setup Java and NetBeans


Welcome to the third tutorial on the "How to Code in Java" tutorial series. Previously, we learned the advantages and disadvantages of Java. In this tutorial, I'll be showing you how to set up Java on a Window machine. I'll also guide you through how to set up Netbeans, an IDE for Java. The structure of tutorial for this series is in this post, check it out if you're interested in reading the rest of the series. If you're interested in what is an IDE and why you probably need one, you can read it on my other post here. Now, let's begin.