100 Days of Java challenges

Join the 100 day Java coding challenge. Master Java with daily challenges, projects, and expert guidance.
Start coding today!

Day 1 - Hello World

1. Write a program that prints "Hello World!" to the console
2. Add single line and multi-line comments to your code

Reading List:
1. Learn the difference between Java and Python
2. What is a Java compiler and how does it work?
3. Difference between Compiler and Interpreter

Day 2 - Variables and Data Types

1. Declare and initialize variables for various data types including integer (int), floating-point number (double), and string (String). Then, print each variable to the console.

Reading List:
1. Learn the terms: initialization, declaration and assignment of variables
2. Learn the difference between Primitive and Non-Primitive data types
3. Default values and sizes of primitive data types

Day 3 - Input and Output

1. Write a program that reads user input and print it to the console.
2. Modify the program to read and print different data type inputs (integers, floating-point numbers, strings)
3. Write a program to read the user input using Scanner class

Reading List:
1. Explore various methods for reading different type of inputs

Day 4 - Basic Arithmetic Operations

1. Write a program that declares two integer variables and perform basic arithmetic operations (addition, subtraction, multiplication, division) on them. Print the results to the console.
2. Write a program that calculates the area of a rectangle. Prompt the user to input the length(integer) and width(integer) of the rectangle, calculate the area (length * width), and print the result.
3. Modify the above program to read decimal numbers as the length and width, and output the area to two decimal points

Reading List:
1. Learn about formatting options such as precision, alignment, and decimal places to present output in a clear and concise manner

Day 5 - Compound Assignment Operators

1. Write a program that utilizes increment(++) and decrement(--) operators.
2. Write a program that utilizes the following compound operators +=, -=, *=, /=, and %=.

Day 6 - Type Conversion

Write a program that performs the following tasks:
  • Convert a String to an Integer
  • Convert a String to a Float
  • Convert an Integer to a String using valueOf() method
  • Convert an Integer to a String using toString() method

Day 7 - Math Operations

Write a program that performs the following tasks using Math class:
  • Maximum of 2 numbers
  • Minimum of 2 numbers
  • Square root of a number
  • Floor and Ceil of a float
  • Abs value of a double

Day 8 - Conditional Statements (if-else)

1. Write a program that reads an integer as user input and prints whether the number is Odd or Even to the console
2. Write a program that takes three numbers as input and prints the largest among them
3. Write a program that checks if a given input year is a leap year or not

Day 9 - Switch Statement

1. Write a program that reads the percentage and then prints their corresponding letter grade (A, B, C, D, or F) using switch statement

Reading List:
1. Understand the advantages and drawbacks of if-else and switch statements

Day 10 - Loops (for, while, do-while)

1. Write a program that reads an input integer 'n' and prints the sum of integers from 1 to 'n' using three different types of loops: for, while, and do-while loops.
2. Write a program that reads an input integer 'n' and prints the sum of even integers from 1 to 'n' (use continue).
3. Write a program that generates random numbers between 1 and 100 until it finds a number divisible by both 5 and 7. When the number is found, print it and terminate the loop using the break statement.

Day 12 - StringBuffer and StringBuilder

Day 19 - Random Number Generation

Day 24 - Object-Oriented Programming (OOP)

Day 33 - Serialization and Deserialization

Day 42 - JDBC (Java Database Connectivity): Introduction

Day 44 - JDBC: Prepared Statements and Transactions

Day 45 - JDBC: ResultSet and Metadata

Day 46 - JDBC: Advanced Concepts

Day 47 - Spring Boot: Foundations

Day 48 - Spring Boot: REST API with Spring MVC

Day 49 - Spring Boot: Data Persistence with JPA

Day 50 - Spring Boot: CRUD Operations with Spring Data JPA

      Blog|Careers|Contact Us
      Have Feedback or want to contribute? Email: hello[@]100DaysOfCode.io
      100DaysOfCode@2024