Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/main/java/VariablesAndArrays.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ public class VariablesAndArrays {
public int declareInt() {

// Tu código aquí
int age = 30;

// Sustituye el 0 por tu variable ¡pero no borres el return!
return 0;
return age;
}

/**
Expand All @@ -22,9 +23,10 @@ public int declareInt() {
public boolean declareBoolean() {

// Tu código aquí
boolean isActive = true;

// Sustituye el false por tu variable
return false;
return true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

En este caso la variable se llama "isActive", por tanto sería return isActive.

}

/**
Expand All @@ -36,10 +38,11 @@ public boolean declareBoolean() {
public char declareChar() {

// Tu código aquí
char initial = 'J';


// Sustituye el espacio por tu variable
return ' ';
return 'J';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aquí también sería return initial

}

/**
Expand All @@ -51,9 +54,10 @@ public char declareChar() {
public String[] declareStringArray() {

// Tu código aquí
String[] names = {"Ana","Luis", "Marta"};

// Sustituye new String[0] por la variable 'names'
return new String[0];
return names;
}


Expand Down