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
37 changes: 7 additions & 30 deletions first-project/src/main/java/org/example/Main.java
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
package org.example;

public class Main {
public class FindMaxOfFour {
public static void main(String[] args) {
int a = -1;
int b = 2;
double d = 2.2;
float f = 2.2f;
String s = "just-string";
boolean l = true;
// System.out.println(a + b);

// if (a > 0) {
// System.out.println(a);
// }else{
// System.out.println("a<=0");
// }
// int i = 0;
// while(i < 10){
// System.out.println(i);
// i++;
// }

Human human = new Human(30, 180);
Human human1 = new Human(29, 179);
Human baby1 = new Human(55);


System.out.println(baby1.olderThan18());
System.out.println(human.getAge());

int a = 15;
int b = 42;
int c = 7;
int d = 89;
int max = Math.max(Math.max(a, b), Math.max(c, d));
System.out.println("Максимальное число : " + max);
}
}