Skip to content
Open
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
13 changes: 11 additions & 2 deletions first-project/src/main/java/org/example/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,16 @@ public static void main(String[] args) {
// System.out.println(i);
// i++;
// }

int n = 4;
int arr[] = {10, 2, 300, 4};
int i = 1;
max = arr[0];
while (i < n) {
if(arr[i] > max) max = arr[i];
i++;
}
System.out.println(max);

Human human = new Human(30, 180);
Human human1 = new Human(29, 179);
Human baby1 = new Human(55);
Expand All @@ -30,4 +39,4 @@ public static void main(String[] args) {
System.out.println(human.getAge());

}
}
}