Tag: Basics

September 23, 2023

Java Basics Exercises – Part 3

Use camel case convention to name this variable. class Main { public static void main(String[] args) { String “” = “Yesterday”; } } lastseen lastSeen last_seen Submit Use numbers to define related variables. class Main { public static void main(String[] args) { String securityQuestion1 = “What was the name of your first pet?”; String securityQuestion2 […]

September 23, 2023

Java Basics Exercises – Part 2

What does this code displays in the console? String relationshipStatus = “Single”; System.out.println(relationshipStatus); Single relationshipStatus Submit What is the output of this code? String color = “Blue”; //color = “Green”; System.out.println(color); Green Blue Submit What is the return value of this round() method? System.out.println(Math.round(12.49)); 12 13 Submit What is the return value of this length() […]