Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package hw03_01;
- import java.util.*;
- import java.io.*;
- public class Hw03_01 {
- public static void main(String[] args) throws IOException {
- // Testing scanner + variables for the program.
- Scanner scanner = new Scanner(System.in);
- FileInputStream input = null;
- int i = 0;
- int max = i + 1;
- int counts = 0;
- int READ;
- int temp1 = 0;
- int temp2 = 0;
- int temp3 = 0;
- int[] stringArrayTest;
- int[] stringArrayCopy = new int [100];
- int[] stringArrayFinal = null;
- // Code to get input from a specified file.
- try{
- input = new FileInputStream("readme.txt");
- stringArrayTest = new int[100];
- // While loop to populate string with values.
- while((i = input.read()) != -1){
- READ = i;
- stringArrayTest[counts] = READ;
- System.out.printf("%d,", READ);
- System.out.printf(" %c\n",(char) stringArrayTest[counts]);
- counts++;
- }
- // Quick test, making sure the values are stored outside the loop.
- /* System.out.printf("\t%d, %d, %d", stringArrayTest[0], stringArrayTest[1],
- + stringArrayTest[2]); */
- // Needs to have code that compares and creates the LIS, but I cannot figure
- // it out. Seriously, how on earth does it work? I can get all the data I
- // need, but I cannot figure out how to actually sort it. Fuck man, I spent
- // 6 fucking hours on this to no avail.
- }finally{
- if(input != null)
- input.close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement