Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Basic Method Creation | Introduction to Methods
Quizzes & Challenges
Quizzes
Challenges
/
Mastering Methods in Java

bookChallenge: Basic Method Creation

Opgave

Swipe to start coding

Practice creating and calling methods that do not accept any parameters.

  1. Create a public static method named printWelcome that prints the string: Welcome to the Java Methods Challenge!;
  2. Create a public static method named showInstructions that prints the string: Follow the instructions carefully to complete the task.;
  3. Create a public static method named printCompletion that prints the string: Congratulations! You have completed the challenge.

Løsning

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 4
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

close

bookChallenge: Basic Method Creation

Stryg for at vise menuen

Opgave

Swipe to start coding

Practice creating and calling methods that do not accept any parameters.

  1. Create a public static method named printWelcome that prints the string: Welcome to the Java Methods Challenge!;
  2. Create a public static method named showInstructions that prints the string: Follow the instructions carefully to complete the task.;
  3. Create a public static method named printCompletion that prints the string: Congratulations! You have completed the challenge.

Løsning

Switch to desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 4
single

single

some-alt