Learn Java Easy. Chapter 18. Intercepting Guard Conversations

Chapter 18. Intercepting Guard Conversations Chapter 18. Intercepting Guard Conversations During the final phase of our plan, Rich and Pedro will stay a bit more behind, and I’ll move ahead to take care of opening the door. I have very clear instructions, so I don’t think there will be any problems. Evidently, Bud and Pedro … Read more

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

Learn Java Easy. Chapter 17. Decoding Communication Systems

Chapter 17. Decoding Communication Systems Chapter 17. Decoding Communication Systems My fellow escapees have given me homework. I think what they want is to help me keep my mind occupied so I’ll be a bit calmer. Bud is going to access the guards’ communication system and has asked me to help him. If anyone finds … Read more

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

Learn Java Easy. Chapter 16 Exercises

Chapter 16 Exercises Exercises Topic 16 – For-Each Loops in Java Exercises Topic 16 Exercise 1. Iterate over an array of integers and print each number on a new line.   Solution:   public class Main { public static void main(String[] args) { int[] numbers = {1, 2, 3, 4, 5}; for (int number : … Read more

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

Learn Java Easy. Chapter 16. Final Preparations / For-each Loops

Chapter 16. Final Preparations / For-Each Loops Chapter 16. Final Preparations / For-Each Loops There’s nothing left to do; we’re escaping next Monday. Today is Tuesday, so we have enough time to prepare everything. Tomorrow, Chani’s cousin will come, and I’ll give him all the information. On the other hand, I need to explain exactly … Read more

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

Learn Java Easy. Chapter 15. Bypassing the Timer System

Chapter 15. Bypassing the Time Counter System Chapter 15. Bypassing the Time Counter System The corridor leading to the prison exit is the most heavily guarded. You might think it’s because of fear that prisoners might escape through there, but that’s not the case. What happens is that everyone enters and exits through the same … Read more

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

Learn Java Easy. Chapter 14 Exercises

Exercises Topic 14 – Reading and Writing Text Files in Java Exercises Topic 14 Exercise 1. Write a program that saves the phrase “Hello World” in a file called output.txt. Solution: import java.io.FileWriter; import java.io.IOException; public class Main { public static void main(String[] args) { try (FileWriter writer = new FileWriter(“output.txt”)) { writer.write(“Hello World”); System.out.println(“Text … Read more

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

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