This file contains hidden or 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
| package com.binus.javafundamental.fordis5; | |
| import java.util.Scanner; | |
| public class OL3 { | |
| public static void main(String[] args){ | |
| // Deklarasi scanner dengan nama input untuk menampung inputan dari user | |
| Scanner input = new Scanner(System.in); | |
| System.out.print("Masukkan Kalimat: "); | |
| // deklarasi varibale kalimat | |
| // tampung inputan kata dari user ke dalam variable kalimat dengan tipe data string |
This file contains hidden or 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
| package com.ol.binus; | |
| import java.util.Scanner; | |
| public class OperatorTernary { | |
| public static void main(String[] args) { | |
| Scanner input = new Scanner(System.in); |
This file contains hidden or 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
| package com.company; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args){ | |
| // deklarasi scanner | |
| Scanner input = new Scanner(System.in); | |
| System.out.print("Masukkan nomor handphone Anda: "); | |
| // deklarasi variable nohp untuk menampung input user |