Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. import java.util.*;
  2. import java.text.*;
  3. import java.io.File;
  4. import java.io.FileNotFoundException;
  5. import java.util.Scanner;
  6.  
  7. public class Question
  8. {
  9.  
  10.     private int K;
  11.     private int T;
  12.     private int C;
  13.         private String [] Answers;
  14.         private String [] Questions;
  15.         private int N;
  16.         private int line,q;
  17.         public String question;
  18.    
  19.  
  20.     public Question( )
  21.     {
  22.    
  23.         try {
  24.             Scanner read = new Scanner(new File("candy.txt"));
  25.             Scanner inScan = new Scanner(System.in);
  26.             Answers = new String[N];
  27.  
  28.             for (q = 0; q < line ; q++)
  29.             {
  30.                 if (q == line)
  31.                 {
  32.                    
  33.                     for (int i = 0; i < N+1; i++)
  34.                     {
  35.                         if (i == N+1)
  36.                         {
  37.                             K = Integer.parseInt(read.nextLine());
  38.                         }
  39.                         else
  40.                         {
  41.                             Answers[i] = read.nextLine();
  42.                         }
  43.                     }
  44.                    
  45.                 }
  46.                 else
  47.                 {
  48.                     question = read.nextLine();
  49.                 }
  50.             }
  51.         }      
  52.         catch (FileNotFoundException e) {
  53.          e.printStackTrace();
  54.        }
  55.        
  56.        
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement