Search:

Type: Posts; User: u-will-neva-no

Page 1 of 2 1 2

Search: Search took 0.81 seconds.

  1. Re: null pointer exception on extending a server class

    When I extend MultiEchoServer, am I correct to say that the main method is not inherited? I thought that when I extend a superclass then I only get the functionality of the previous constructor.
    ...
  2. null pointer exception on extending a server class

    Hey everyone, I am getting a null pointer exception (I will highlight the location after the code is shown). I am trying to extend a class that is a server:




    import java.io.IOException;...
  3. Multiple clients and one server. How to send data from one client to the others

    Hey everyone, I am currently working on a MultiServer class which creates looks for new connections from any client class and creates a thread so that each client can run at the "same time". The...
  4. Replies
    4
    Views
    359

    Re: Inheritance not working!

    ah, it looks like my objects were causing the issue. I shall have a look to see why that is. The throws IOException did the trick, thanks for your help copeg, much appreciated!
  5. Replies
    4
    Views
    359

    Re: Inheritance not working!

    Thanks for the reply. I tried this:


    public SenderReceiver(String host,int port)throws IOException{
    super(host,port);
    }

    but get a "cannot retrieve symbol"
  6. Replies
    4
    Views
    359

    Inheritance not working!

    Hey everyone, I am basically trying to just use the super keyword to call my subclass:



    public class SenderReceiver extends MultiEchoClient{

    public SenderReceiver(String host,int port){...
  7. Re: Binary serarch complexity. Why is it log_2(n) ?

    Thanks Sean!
  8. Binary serarch complexity. Why is it log_2(n) ?

    Hey everyone, I am looking at Binary Search Complexity and am stuck on the final result. For binary search, the array is split into half and a check is made to see if the quantity we want is on the...
  9. Help with manually stepping through these loops

    Hey everyone, I was wondering if you could explain the 'best approach' in manually stepping through the following lines of code. It has two loops but the main problem in understanding the code is...
  10. testing weather one object is greater than another object

    Hey everyone, I have to write a compare method that takes two parameters. I would like to know if I can compare one object with another by comparing if it is greater or less than the other one. I...
  11. Replies
    1
    Views
    665

    Re: acces denied on windows 7 ??

    Watch these java tutorials. Your issue is covered in the first episode.
    Java Programming Tutorial - 1 - Installing the JDK - YouTube
  12. Re: Any good books for java game development?

    Anyone know?
  13. Any good books for java game development?

    Hi everyone, I know the basic things about java and I want to start making some games in java. I
    learn best from books so I was wondering if there were any beginner books for java game development....
  14. Replies
    3
    Views
    1,488

    Re: Argument promotion

    Because it is "promoting" an int to a String, or something that requires more bits (least thats how I interpret it). Basically what i am referring to is the opposite of casting, like having a double...
  15. Replies
    3
    Views
    1,488

    Argument promotion

    Hello everyone, I know this is a lame question but would it be possible to show me some examples of argument promotion? I would like to, for example, convert an int to a string.

    Thank you XD
  16. Re: passing a string and int array into a static method

    The top line did the trick, thank you very much!!
  17. passing a string and int array into a static method

    Hello everyone, Is there anyway of passing a String array and also an int array through a same static method? If so, how do I do it :) Thank you!
  18. Replies
    1
    Views
    358

    array problem

    Hello everyone, below is my code;


    import java.util.Scanner;
    public class user1{

    public static void main(String args[])
    {
    Scanner input = new Scanner(System.in);
    String array[] = new...
  19. array to store multiple names and data

    Hello everyone, I realise that i have written in the wrong section, feel free to move my post into the correct section..

    Here is my code below..



    import java.util.Scanner;
    public class...
  20. Can you pass parameters from one method into another method?

    Hello everyone, I am attempting to write a program whereby it calculates the total amount of cash that the user has and also the interest. I have done that..what i now want to do is allow the user to...
  21. Re: Improving the code to produce the same program

    Ok I found issues with my previous code..I have resorted back to my while loops but have integrated the modulus, which solves the issue of $45 printing all $5...Im happy with my code, its does what...
  22. Re: Improving the code to produce the same program

    ok I solved all of my issues...any advice in improving it further?



    public static int cash(int k)
    {


    //variables
    int mod;
  23. Re: Improving the code to produce the same program

    I found a temporary solution to splitting up the remainder of $15...just using an if else statement...


    public static int cash(int k)
    {


    //variables
    int mod;
    int total;
  24. Re: Improving the code to produce the same program

    oh I see... I have been able to simplify it alot more. However, I and using one for loop...my other issue is that when i enter a number such as $20, my output when compiled is $20, $0 because i am...
  25. Re: Improving the code to produce the same program

    While I have still not found the solution, i would just like to thank you two for helping me!
Results 1 to 25 of 32
Page 1 of 2 1 2