Search:

Type: Posts; User: TSSF44

Page 1 of 2 1 2

Search: Search took 0.70 seconds.

  1. Re: 3 classes - Simple school assignment - ArrayLists

    Thank you, I'm working on it as I type. Yes, that is true. I guess I will just have to take more risks trying things before posting questions asking for help :cool:

    --- Update ---

    Here's what I...
  2. 3 classes - Simple school assignment - ArrayLists

    Hello everyone,

    I was given an assignment in a JAVA class that seems relatively simple. However, to an inexperienced programmer like myself, this is very confusing. All I need to do is complete...
  3. Replies
    3
    Views
    166

    [SOLVED] Re: Basic java- objects & classes

    Actually, that is not compiling for some reason. Geany says it cannot find the symbol. Do I need to extend Session to Pupil or something of the sort?

    Edit:

    Wow I can't even get the fundamentals...
  4. Replies
    3
    Views
    166

    [SOLVED] Re: Basic java- objects & classes

    Thank you. That makes sense.. I'm trying to do some more reading on the chapter / oracle docs. I'm a long way from understanding OOP.
  5. Replies
    3
    Views
    166

    [SOLVED] Basic java- objects & classes

    Hello everyone,

    I am attempting a problem in my second computer science course. I am very confused at the moment. Any help would be appreciated.


    "Create class Sess. A Sess object is to...
  6. Replies
    1
    Views
    633

    Can't understand simple Recursion:

    class RecursionTest
    {
    public static void main(String[] args)
    {

    System.out.println(reverse("ABCDEF"));
    }
    //----------------------------------
    public static String...
  7. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    I can't thank you enough Kewish. I need to start using the oracle docs more. VERY Helpful.


    Final answer:




    import java.io.*;
    import java.util.Scanner;
  8. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    import java.io.*;
    import java.util.Scanner;

    public class Chapter13 {

    public static void main(String[] args) {


    File object = new File(args[0]);
    int count =...
  9. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    Thank you.. I guess I was searching incorrectly. And I really thought I needed DataInputStream no matter what

    Anyway, I created a data.txt so that code would run, and nothing happened when I ran...
  10. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    Scanner sc = new Scanner(new File("test.txt"));
    DataInputStream binIn = new DataInputStream(new FileInputStream(args[0]));
    File object = new File(args[0]);
  11. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    An array args index 0? Sorry. I am just a beginner

    args[0] is what you enter on the command line?
  12. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    File takes a string in the constructor?


    the text file is passed as args[0]
  13. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    InputStream? Im reading through the whole Scanner class now
  14. Replies
    17
    Views
    225

    Re: File Processing- Command Line Arguments

    Thank you. Still trying to figure it out.

    to make a new file I would use
    Scanner sc = new Scanner(new File("myNumbers")); , but I thought I am supposed to specify the file in the command line?
  15. Replies
    17
    Views
    225

    File Processing- Command Line Arguments

    Here is the problem I am trying to solve:


    Write a program that determines and displays number of lines in a file that you specify on the command line. Example run:

    java YourClass test.txt
    12...
  16. Re: - Constructor method?

    WOW. Silly mistake. Although they do look pretty similar.

    Thank you for finding it.
  17. Re: - Constructor method?

    Did you see the attached image?

    Full error in BlueJ:

    The symbol namd in the error message was expected to appear at this point in the code. It was not there; instead, there was some other...
  18. - Constructor method?

    Hello,

    I am receiving an error when I try to create a constructor method. It makes no sense at all to me because right next to the program, I have a correctly compiled version of it. What is...
  19. Replies
    2
    Views
    159

    Re: Returning value from method? Arrays-

    Thank you! That makes sense. I had no idea what I was doing wrong.
  20. Re: Very simple question (nextDouble- Random class)

    Thanks, I figured it out after posting that. I shouldn't be so quick to ask questions.
  21. Replies
    2
    Views
    159

    Returning value from method? Arrays-

    Hello everyone,

    Here is the problem that I am trying to solve: Write a method that is passed two arrays. Your method should return true if the two arrays have the same size and the same...
  22. Re: Very simple question (nextDouble- Random class)

    Thank you. That's what I thought. My professor insists that I use nextDouble. By doing what you said, I can get the range from 10 to 20? It seems to be 0 - 10.
  23. Replies
    12
    Views
    235

    Re: Simple question- nonstatic variable?

    Thanks everyone, I learned a lot in this thread.
  24. Very simple question (nextDouble- Random class)

    *
    If I change the method to nextInt, it works fine though. How can I use nextDouble without getting the error message? Method next.Double cannot be applied. Required : no arguments, Found: int....
  25. Replies
    12
    Views
    235

    Re: Simple question- nonstatic variable?

    Thank you, but maybe I should just stop using Bluej. Ive been compiling the whole time and those are the only errors that Bluej gives me.



    Thanks for the help to both of you. I won't just inner...
Results 1 to 25 of 31
Page 1 of 2 1 2