Learn Java Easy. Chapter 11. Hacking the Security System Again

Chapter 11. Hacking the Security System Again Chapter 11. Hacking the Security System Again The day has come, the escape has officially begun, and from today, there is no turning back. Peter must already be in the library, so if everything goes as we expect, the alarm will sound shortly. Bud is already ready with … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 10 Exercises

Exercises Topic 10 – Date and Time in Java Exercises Topic 10 Exercise 1. Get the current date Solution: import java.time.LocalDate; public class Main { public static void main(String[] args) { LocalDate currentDate = LocalDate.now(); System.out.println(“The current date is: ” + currentDate); } } Exercise 2. Get the current time Solution: import java.time.LocalTime; public class … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 8 Exercises

Exercises Topic 8 – 2D Arrays in Java Exercises Topic 8 Exercise 1. Create a 5×5 2D array representing prison cells. Fill all positions with the value 0, indicating that all cells are empty. Solution: public class Main { public static void main(String[] args) { int[][] cells = new int[5][5]; // Fill the array with … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 10. Working with Date and Time

Chapter 10. Working with Date and Time Chapter 10. Working with Date and Time My part is already done. After creating the code for the programs Pedro needs, I’ve hidden them inside a system folder. It didn’t take me even half an hour to do it. I don’t need the computer anymore, so I’ll go … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 9. Creating a Distraction Device. With Loops, Conditionals and Scanner

Chapter 9. Creating a distraction device. With loops, conditionals and scanner Chapter 9. Creating a distraction device. With loops, conditionals and scanner I hadn’t realized it, but I’ve already been behind bars for almost a month and a half. It may not be a long time, but I’ve already forged a great friendship with Bud. … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 8. Bud’s Job. 2D Arrays

Exercises Topic 8 – Bud’s Work. 2D Arrays Chapter 8. Bud’s Work. 2D Arrays The days feel endless. I am eagerly waiting for Rich’s visit, but he is taking longer than usual. It has been ten days since I had the conversation with Chani’s cousin and he still hasn’t come to see me. Bud keeps … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 7 Exercises

Chapter 7 Exercises Chapter 7 Exercises Exercise 1. Create an array that contains the numbers from 0 to 9. Then make them display on the screen in reverse order. Solution: public class Main { public static void main(String[] args) { int a[] = new int[10]; for (int i=0;i<=9;i++) { a[i] = i; } for (int … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 7. Rich’s Cousin’s Visit. Random Arrays

Chapter 7 Exercises – Rich’s Cousin’s Visit. Random Arrays Chapter 7. Rich’s Cousin’s Visit. Arrays Today I received an unexpected visit. I’m still a bit stunned. Around 12 in the morning, a prison guard came to get me and took me to the visiting room. I thought it would be my mother or maybe the … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 6 Exercises

🎲 Random Number Exercises in Java | Solved Topic 6 Topic 6 Exercises Exercise 1. Create a program that calculates the roll of twenty dice and the sum of the results. Solution: public class Main { public static void main(String[] args) { int sum =0; //First we will create a loop for the 20 dice. … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏

Learn Java Easy. Chapter 6. Helping Bud. Random Numbers

Chapter 6: Helping Bud and Using Random Numbers in Java Chapter 6. Helping Bud. Random Numbers I have news from my lawyer and it is not good at all. My computer was used to access a criminal website that provided services to hack the security systems of companies. But that’s not all, this software is … Read more

Did you like it? Don’t keep it to yourself — share it like juicy gossip! 😏