Type: Posts; User:

Page 1 of 2 1 2

Search: Search took 0.25 seconds.

  1. Replies

    Collection Interface

    I was watching a video that says that there is no concrete class that implements collection interface directly; however, when I look in the java documentation and go to the linkedlist class, it...
  2. Replies


    In netbeans, before running your client application, you have to deploy your EJB to glassServer. What is the purpose of glassServer and why do we have to do that?
  3. Replies

    JNDI and EJB

    We are making a basic enterprise application using EJB. My sessionbean has some basic add and subtract methods added to it. My professor was discussing about JNDI today, and i do know what it is....
  4. How to make a basic game play from two computers?

    My recent project was to build a tic tac toe game that lets the client connect to the server using RMI. I built this game using eclipse IDE and managed to start up to clients from my laptop. This...
  5. Re: Java Threads and Networking

  6. Java Threads and Networking

    new Thread( () -> {
    try {
    // Create a server socket
    ServerSocket serverSocket = new ServerSocket(8000);
    Platform.runLater(() ->
  7. Formating integers into money

    having the following fields for my money class.
    import java.text.DecimalFormat;
    public class Money
    //Fields for money will hold dollars and cents
    private long dollars;
    private long...
  8. Copying objects through constructors?

    I have a class named Cash shown below
    public class Cash
    //Quanity Field and RetailItem Object field
    private int total_units;
    private Retail myRetail;

    //Create first constructors...
  9. Replies

    Re: Enum questions

    Lol, I already tried figuring out or else I wouldn't have posted it here, frankly speaking. My guess is that "Monday" is being stored in that variable instead of 1. I'm highly positive of this but is...
  10. Replies

    Enum questions

    The following code
    enum Days {Sunday, Monday, Tuesday);

    Days workday= day.monday; simple question members, though not for me. What is being stored in the variable workday? Is the value of Monday...
  11. Re: Using this reference variable on constructors

    In my book, it had the code
    public RetailItem(String desc,int itemNumber,
    double wholesale, double retail)

    cost=new CostData(wholesale, retail);
  12. Using this reference variable on constructors

    Im trying to simplify my constructor by using this reference variable. Im aware how to use this reference when making constructors that involve fields of primitive data types; however, not so...
  13. Replies

    Enumerations help

    I have created an enumerated data type that represents months. In my program I have asked the user for the month. I hold the month entered by user into a string variable. From that string variable...
  14. Getting error on equals method for objects

    I'm taking an introduction to java class right now, so please don't advice me to something that I have not learned yet. My assignment is that I have to create a class that has two fields. One called...
  15. Re: Creating objects from methods

    Ok, so I'm reading my java book and this is what it reads . The book also mentions that Either I'm interpreting this wrong, which I believe I am, or I doubt your actually wrong :D since your more...
  16. Replies

    Re: FileDisplay Class

    Your English is fine. Yes that is exactly what I mean. I'm wrong in this part but this is what I'm thinking. In my main code
    public static void main(String...) suppose a variable like int number is...
  17. Re: Creating objects from methods

    I do understand what the error is. Basically the variable is not initialized to any value. From my understanding and from what I have read, when passing objects to methods, the reference variable is...
  18. Re: Creating objects from methods

    Thank your for your response! I'm aware that's not the conventional way of writing a code; however, I was using my ipad during that time. Apologize for my mistake. Also, I did peak on to the links...
  19. Re: Passing Objects to Constuctors

    I take that back. I'm totally confused now, after seeing this writing of code being used in my book. In a hurry right and not so sure if I mentioned that
    .getDescription got used in a constructor. ...
  20. Creating objects from methods

    public class demo
    Public class static void main(String[]args)
    //Creating a variable that will be a reference to the object
    Peoples person_one;

    //create an object using void method
  21. Replies

    Re: Closing files

    Sweet :D makes much for sense!thank you Cornix!
  22. Re: Passing Objects to Constuctors

    Glad to hear that since his method just confused me out! Thank you!
  23. Passing Objects to Constuctors

    We are learning about how to pass objects into constructors. In our class, we made this following code
    public class InventoryItem
    private String description;
    private int units;
  24. Replies

    Re: Closing files

    Got your point but what I have been reading from my book, it guided me to close all of your ouput and input files when I'm done reading and writing with them...I'm aware that whenever I don't close...
  25. Re: How to open files when in classes instead of the main code.

    haha...I should clarified about how to use "files" in classes not how to use the file class :D Appreciate our response though!
Results 1 to 25 of 42
Page 1 of 2 1 2