Beginner 30 Day Java Challenge

I have been a front-end developer for a year and a half now and I have always been interested in learning a server-side language but with the dynamics of life I found that I hardly had time to do so. However, when I got the chance to be a technical writer here at Techblog I decided to use this platform as a chance for me to learn Java knowing that I might be inclined to stick to the learning process if get to document my progress. Here is a breakdown of the topics I will be tackling:

 

Week 1: Java basics

Day 1-3: Introduction to Java

  • Setting up Java development environment (JDK, IDE)

  • Writing and running a simple "Hello, World!" program

Day 4-6: Variables and Data Types

  • Understanding data types (int, double, boolean, etc.)

  • Declaring and initializing variables

  • Typecasting and conversions

Day 7-9: Operators and Expressions

  • Arithmetic, comparison, and logical operators

  • Precedence and associativity of operators

  • Using expressions to solve simple problems

Week 2: Object-Oriented Programming (OOP)

Day 10-12: Classes and Objects

  • Defining classes and objects

  • Constructors and instance variables

  • Methods and method overloading

Day 13-15: Inheritance and Polymorphism

  • Creating subclasses and superclasses

  • Method overriding and dynamic method dispatch

  • Using polymorphism to write flexible code

Day 16-18: Encapsulation and Access Modifiers

  • Encapsulation principles and benefits

  • Public, private, protected, and default access modifiers

  • Getters and setters for encapsulated classes

Week 3: Advanced Java Concepts

Day 19-21: Exception Handling

  • Understanding exceptions and their types

  • Using try-catch blocks to handle exceptions

  • Throwing custom exceptions

Day 22-24: Collections Framework

  • Introduction to collections (lists, sets, maps, queues)

  • Using ArrayList, HashSet, HashMap, etc.

  • Iterating through collections and common methods

Day 25-27: File Handling and I/O

  • Reading from and writing to files

  • Buffered streams vs. unbuffered streams

  • Handling text and binary data

Week 4: Java Applications and Project

Day 28-29: Introduction to GUI

  • Building simple graphical user interfaces (Swing or JavaFX)

  • Creating buttons, labels, text fields, and event handling

Day 30: Mini Java Project

  • Apply the knowledge gained in the previous days to create a small Java project

  • It could be a simple calculator, a task manager, or any other creative idea

  • Focus on good code organization, OOP principles, and user interaction

For day 1 I am learning how to set up the Java development environment. I prefer to use Visual Studio code for the development but there are several other IDES one can use e.g Eclipse, IntelliJ IDEA

and NetBeans to name but a few.

1. You can start by making sure you have installed the Java development kit(JDK) on your machine and you can verify the installation by running ‘java -version’ on your terminal.

2. if you do not have visual studio code you can download it from their official website:https://code.visualstudio.com/.

3. You can install the Java extension pack from extensions in the VS code.

4. You should press Press Ctrl + , (comma) to open Settings, search for "Java Home," and provide the path to your JDK installation directory.

5. You create your Java project by creating a new folder for your project open the folder in the Vs code and create a new Java file with the .java extension e.g. app.java.

6. Use the "Run" and "Debug" buttons that appear above your main method in the Java file to execute and debug your Java code. You can also use the integrated terminal to compile and run your Java code manually.

After doing all this I will write my first Hello, World! Program. I will name my file HelloWorld.java.


public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

 

Save the file and run it. This should be the output:

Hello, World!

I am so excited that I get to document my learning journey and share it. Happy coding!