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
class Reverse { | |
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
public static void eavesdrop (); | |
eavesdrop ("Kai is fun", "Kai") --> "is fun"; |
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
public static void main(String args[]){ | |
system.out.println ("What is your name?"); | |
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
import java.util.Scanner; | |
public class LameGame { | |
public static void main(String[] args) { | |
System.out.println("What is my favorite number?"); | |
Scanner number = new Scanner(System.in); | |
int favoriteNumber = 4; | |
int userGuess = number.nextInt(); | |
if(userGuess == favoriteNumber){ | |
Junk2.congrats(); |