Learn Java Easy. Chapter 14. Reading and Writing Text Files

Chapter 14. Reading and Writing Text Files Chapter 14. Reading and Writing Text Files Since we already have the record of the medicines stolen by Phil, it’s time to blackmail him. Peter will meet with him today. We have no doubt he will cooperate. If we presented the evidence, not only would he be fired, … Read more

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

Learn Java Easy. Chapter 13. Gathering Evidence Against Phil

Chapter 13. Gathering Evidence Against Phil Chapter 13. Gathering Evidence Against Phil After the alarm incident and the subsequent blackout, prison officials are on high alert. They’re starting to suspect something and are taking extraordinary precautionary measures. Most of these don’t affect us, but in order to access the prison hospital, the first thing Bud … Read more

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

Learn Java Easy. Chapter 12 Exercises

Chapter 12 Exercises – Try & Catch in Java Chapter 12 Exercises Exercise 1. Division by zero. Write a program that asks the user for two numbers and tries to divide the first by the second. Handle the ArithmeticException in case of division by zero. Solution: import java.util.Scanner; public class Main { public static void … Read more

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

Learn Java Easy. Chapter 12. Try & Catch

Chapter 12. Try & Catch Chapter 12. Try & Catch Bud has obtained the keys he needed from Vincente’s office. They will prove essential to execute the plan. Getting out of prison won’t be easy, but returning without anyone noticing will be even more complicated. It seems that one of the officials working at the … Read more

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

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! 😏