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 class PrintOneOverN { | |
public static void main(String[] args) { | |
int finalDinominator = 20; | |
for (double i = 1; i <= finalDinominator; i++) { | |
System.out.println(1d/i); | |
} | |
} | |
} |
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 CharCheck { | |
public static void main(String[] args) { | |
Scanner keyboard = new Scanner(System.in); | |
System.out.println("Begin!"); | |
while (true) { | |
char input = keyboard.next().charAt(0); | |
if (isDigit(input)){ |
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.louishong; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.lang.reflect.Field; | |
public class ReadFile{ |
NewerOlder