Object Oriented Programming with Java
ToledoSlackGitHub Org 1GitHub Org 2
Primary version
Primary version
  • About this Course
  • Introduction to Computer Programming
    • Introduction to Computer Programming
    • Challenges
    • Multiple Choice
  • Basic Building Blocks
    • Basic Building Blocks
    • Challenges
    • Multiple Choice
  • Starting in Java
    • Starting in Java
    • Challenges
    • Multiple Choice
  • Storing and Processing Data
    • Storing and Processing Data
    • Challenges
    • Multiple Choice
  • Making Decisions
    • Making Decisions
    • Challenges
    • Test Yourself
    • Multiple Choice
  • Loop Constructs
    • Loop Constructs
    • Challenges
    • Multiple Choice
  • Strings
    • Strings
    • Challenges
    • Multiple Choice
  • Arrays
    • Arrays
    • Challenges
    • Multiple Choice
  • Object Oriented Thinking
    • Object Oriented Thinking
  • All About Objects
    • All About Objects
    • Multiple Choice
  • Defining Classes
    • Defining Classes
    • Challenges
    • Multiple Choice
  • Methods
    • Methods
    • Challenges
    • Multiple Choice
  • Constructors
    • Constructors
    • Multiple Choice
  • Inheritance
    • Inheritance
  • Starting with JavaFX
    • Starting with JavaFX
  • Hands On
    • Hands on MQTT
    • Hands on GSON
  • Hack @ IT
    • Hack @ IT
    • Caesar Encryption
      • Solution
    • Complex Numbers
  • Assignments
    • Number Characteristics
    • Linear Equation
    • LineSegment
  • Videos
    • Videos
  • Sources
    • Sources
Powered by GitBook
On this page
  • Printing Personalized Hello
  • Fix the Syntax Errors
  • Application 1
  • Application 2
  • Application 3
  • Application 4
  • Application 5
  • Personal Details
  • Escape Characters
  1. Starting in Java

Challenges

Printing Personalized Hello

Create a program that prints out a message to the user saying hello and stating your name.

For example:

Hello, this application was developed by Nico De Witte.

Fix the Syntax Errors

Fix the syntax errors in the following applications. Take note of the different error messages given by NetBeans.

Application 1

public static void main(String[] args) {
    System.out.println("Hello world")
}

Application 2

public static void main(String[] args) {
    System.out.println("Hello user");
    System.out.printn("I am a student at VIVES University");
    System.out.print("I really like playing games and going out.\n");
}

Application 3

public static void main(String[] args) {
    System.out.println("I have a total of " + 124 " achievements on Steam.");
}

Application 4

public static void main(String[] args) {
    System.out.println("The circumference of the planet is " + "40,075 km";
}

Application 5

public static void main(String[] args) {
    system.out.println("One programmer said to another:");
    system.out.println("I need a </br>");
}

Personal Details

Create an application that prints out some personal information about yourself, like for example:

  • your name

  • your age

  • your height

  • your weight

  • the color of your eyes

  • ...

Try to concatenate strings with actual numbers like for example:

System.out.println("I am " + 3 + " feet tall");

Escape Characters

Try to output the information below using Java. Make sure to use escape characters to create extra new lines, tabs and such.

Hello there. I am a student learning to program.
I follow courses at VIVES University. Their address is
    Spoorwegstraat 12
    8200 BRUGES

My favorite course is "Object Oriented Programming".

You can find the course documents @ https://vives.gitbook.io/oop-with-java/
PreviousStarting in JavaNextMultiple Choice

Last updated 6 years ago