Wed. Jan 15th, 2020

Host your Website

Read and learn

If Anweisungen in Java | Java Tutorial #4

1 min read



Java SE Development Kit:
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Eclipse:
https://www.eclipse.org/downloads/

Hier nochmal der Quellcode:

package Basics;

public class if_anweisungen {
public static void main(String[]args) {
System.out.println(“Wie alt bist du? “);
int Alter = new java.util.Scanner(System.in).nextInt();
if(Alter (spitze Klammer)= 18) {
System.out.println(“Willkommen”);
}
else if(Alter (spitze Klammer)= 16) {
System.out.println(“Beschränkter Zugang. “);
}
else {
System.out.println(“Du bist zu jung. “);
}
}
}

[Icon made by https://www.flaticon.com/authors/freepik from https://www.flaticon.com/]

Copyright © All rights reserved. | Newsphere by AF themes.