Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed code style issues #1332

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
43 changes: 43 additions & 0 deletions src/main/java/core/basesyntax/HelloWorld.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package core.basesyntax;

import core.basesyntax.model.Cat;
import core.basesyntax.model.Dog;
import java.time.LocalDate;

public class HelloWorld {
private String string;
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);
}

private void initializeVariables() {
string = "Hello mates!";
System.out.println(string);
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);
}
}
46 changes: 0 additions & 46 deletions src/main/java/core/basesyntax/Hello_World.java

This file was deleted.

12 changes: 6 additions & 6 deletions src/main/java/core/basesyntax/Model/Cat.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package core.basesyntax.Model;
package core.basesyntax.model;

public class Cat {
private int age;
Expand All @@ -7,10 +7,10 @@ public class Cat {

@Override
public String toString() {
return "Cat{" +
"age=" + age +
", name='" + name + '\'' +
", ownerName='" + ownerName + '\'' +
'}';
return "Cat{"
+ "age=" + age
+ ", name='" + name + '\''
+ ", ownerName='" + ownerName + '\''
+ '}';
}
}
2 changes: 1 addition & 1 deletion src/main/java/core/basesyntax/Model/Dog.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package core.basesyntax.Model;
package core.basesyntax.model;

public class Dog {
}
Loading