Results 1 to 2 of 2
  1. #1
    jay_mascis is offline Member
    Join Date
    Apr 2011
    Rep Power

    Default Calling classes from another class

    Hi all, new to this so firgive my ignorance,

    I have a class called DatabaseCheck that does most of my processing and am trying to call another class called SMSListen that I call that is supposed to listen for incoming serial port activity

    i call it as follows from my main class
    new SMSListen();

    it compiles fine and doesn't complain but not sure if it works. Is it possible to see the output of both classes i.e. all the System.out.println (blah blah..
    in the dos prompt command window from which i am running my main class??

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Rep Power


    Java Code:
    System.out.println(this); // print out for the object your are in
    Foo f = new Foo();
    System.out.println(f); // print out for the Foo object
    This relies on both classes having a meaningful toString method.

Similar Threads

  1. using and calling class within classes..
    By Bgreen7887 in forum New To Java
    Replies: 5
    Last Post: 10-27-2010, 03:49 PM
  2. Calling Methods between classes?
    By questionanswer in forum New To Java
    Replies: 2
    Last Post: 03-22-2010, 01:22 AM
  3. Child-Class Calling a Method in a Parent-Class
    By Blah_ in forum New To Java
    Replies: 5
    Last Post: 09-29-2009, 02:48 AM
  4. Calling a method on original class from created class
    By kpedersen in forum Advanced Java
    Replies: 4
    Last Post: 08-20-2008, 12:25 AM
  5. Calling jar classes from java executable
    By SteM in forum Advanced Java
    Replies: 1
    Last Post: 11-27-2007, 08:21 AM

Posting Permissions

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