Search:

Type: Posts; User: theostorm

Search: Search took 0.14 seconds.

  1. Replies
    1
    Views
    1,151

    Re: Int not adding up right.

    Ah figured it out, obvious mistake of using an int when I should have used a double.
  2. Replies
    1
    Views
    1,151

    Int not adding up right.

    int wordpercent = ((count/totalwords)*100);
    JOptionPane.showMessageDialog(null, "Count: " + count);
    JOptionPane.showMessageDialog(null, "Words: " + totalwords);...
  3. Re: Using the same scanner multiple times in code help

    I've decided to take a different approach, this one works so far!
    [code]public class TextAnalysis {

    public static void main(String[] args) throws Exception {
    ...
  4. Re: Using the same scanner multiple times in code help

    Thanks for the suggestion. It looks like it must be at the end of the file, because I can get it to print out whatever number I want before the "while (words.hasNext)" statements. I've figured out...
  5. Using the same scanner multiple times in code help

    import java.io.File;
    import java.util.Scanner;

    import javax.swing.JFileChooser;
    import javax.swing.JOptionPane;
    import javax.swing.UIManager;

    public class TextAnalysis {

    public static...
Results 1 to 5 of 5