generated from mate-academy/jv-homework-template
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad696ad
commit 2614f69
Showing
6 changed files
with
63 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package core.basesyntax; | ||
|
||
import core.basesyntax.model.Cat; | ||
import core.basesyntax.model.Dog; | ||
import java.time.LocalDate; | ||
|
||
public class HelloWorld { | ||
private String helloMessage; | ||
private int variable; | ||
private int age; | ||
private int size; | ||
|
||
public static void main(String[] args) { | ||
Dog dog = new Dog(); | ||
Cat cat = new Cat(); | ||
} | ||
|
||
private String getFromOneToTen() { | ||
String result = ""; | ||
for (int i = 0; i < 10; i++) { | ||
if (i % 2 == 0) { | ||
result = result + i + " "; | ||
} | ||
} | ||
return result; | ||
} | ||
|
||
private void sayHello(String hello) { | ||
System.out.println("Hello, Mate! I am happy to see you! This class looks weird!" | ||
+ " Your task is to fix the checkstyle in this file." | ||
+ " Your goal is to run `mvn clean package` and receive `BUILD SUCCESS` message"); | ||
System.out.println(hello); | ||
} | ||
|
||
private void initializeVariables() { | ||
helloMessage = "Hello mates!"; | ||
System.out.println(helloMessage); | ||
variable = LocalDate.now().getYear(); | ||
System.out.println("It is " + variable + "year"); | ||
age = 25; | ||
System.out.println("I'm " + age); | ||
size = 42; | ||
System.out.println("The size is " + size); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package core.basesyntax.model; | ||
|
||
public class Cat { | ||
private int age; | ||
private String name; | ||
private String ownerName; | ||
|
||
@Override | ||
public String toString() { | ||
return "Cat{" + "age=" + age + ", name='" + name | ||
+ '\'' + ", ownerName='" + ownerName + '\'' + '}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package core.basesyntax.model; | ||
|
||
public class Dog { | ||
|
||
} |