Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Array Basics | Reference Types and Strings
Java Data Types

bookChallenge: Array Basics

Opgave

Swipe to start coding

Implement a method that returns a String array with predefined values. The main method should call this method and assign its return value to a variable. Do not print anything inside the method.

  • Define a public static method named getWords that returns a String array with several predefined words.
  • In the main method, call the getWords method and assign the result to a variable.

Løsning

solution.java

solution.java

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 2. 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

Awesome!

Completion rate improved to 7.14

bookChallenge: Array Basics

Stryg for at vise menuen

Opgave

Swipe to start coding

Implement a method that returns a String array with predefined values. The main method should call this method and assign its return value to a variable. Do not print anything inside the method.

  • Define a public static method named getWords that returns a String array with several predefined words.
  • In the main method, call the getWords method and assign the result to a variable.

Løsning

solution.java

solution.java

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 2. Kapitel 4
single

single

some-alt