Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    4
    Rep Power
    0

    Default accessing fields from another class without creating an object

    Hello,

    I have a client server app running and need to access the OutputStream on the client side from another class. If i create an object of my Client class a new thread is created which is bad news as i strictly need one thread per client.

    I have looked at static methods, but unfortunetly I cannot find a way of getting this to work.

    Thanks for looking into this.

  2. #2
    nigamsir is offline Member
    Join Date
    Mar 2010
    Posts
    11
    Rep Power
    0

    Default

    pls post ur code that is written till now .... i'll try to workout

  3. #3
    Join Date
    Mar 2010
    Posts
    4
    Rep Power
    0

    Default

    I have been able to get this working using a static approach. I have a feeling this isn't the best way of doing it but it does what I need it to do.

    Thanks for your reply nigamsir - much appreciated.

Similar Threads

  1. Replies: 8
    Last Post: 03-21-2009, 10:34 AM
  2. Replies: 6
    Last Post: 12-29-2008, 04:14 AM
  3. Replies: 0
    Last Post: 02-17-2008, 10:01 AM
  4. Inner class accessing outer class
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-17-2008, 09:59 AM
  5. Creating object of Type Object class
    By venkatv in forum New To Java
    Replies: 3
    Last Post: 07-17-2007, 04:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •