Search:

Type: Posts; User: velop

Search: Search took 0.14 seconds.

  1. Replies
    7
    Views
    2,627

    Re: Reversing lines using LinkedList

    Yes. I have one last question. How can I take the text file/input and convert it to a linkedlist, so it can use the reverse method?



    LinkedList<String> list = new LinkedList<String>();...
  2. Replies
    7
    Views
    2,627

    Re: Reversing lines using LinkedList

    Not quite, this is what I have so far.



    Scanner scan = new Scanner (System.in);
    File f = new File("prezodent.txt");
    System.out.print("Enter file name: ");
    Scanner input = new...
  3. Replies
    7
    Views
    2,627

    Re: Reversing lines using LinkedList

    Yes, I too was able to receive the output I expected by modifying it as:


    System.out.println("Phrase in reversed order: " + reverse(phrase));

    Would I be able to use the reverse method to...
  4. Replies
    7
    Views
    2,627

    Reversing lines using LinkedList

    Hi, I'm writing a program that reverses the lines of a String using the LinkedList structure, which includes an iterator. I have my code written out, but every time my program runs, it takes a very...
  5. Replies
    1
    Views
    4,412

    Simple game in Java

    How can I make my program read the input 'Higher' or 'Lower'?



    PlayingCard cardOne = new PlayingCard();
    PlayingCard cardTwo = new PlayingCard();

    double, bank, bet;
    ...
  6. Replies
    1
    Views
    6,917

    Sentence and Letter Count Program

    I'm supposed to write a program which prompts the user to enter a sentence and then prompt the user to enter a single letter of the alphabet (into a char value). It's also supposed to count and...
  7. Replies
    1
    Views
    5,354

    Odd Even Zero Counter?

    I'm trying to create three counters for the number of zeros, odds and even digits entered, but I'm having a little trouble. My code is below:


    import java.util.Scanner;
    public class OddEven
    {...
Results 1 to 7 of 7