codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  activating a method outside of the class in which it is defined.  kunfusedenuf at 10:07 on Sunday, October 02, 2005
 

how do i call a method that is in a different class from within another class? for example...
i am in Class first but there is a method called general(); in Class second. if i am in 'first', how do i called 'general();' if it is in 'second'?

  Re: activating a method outside of the class in which it is defined.  javabits at 19:19 on Sunday, October 02, 2005
 

if general is a static method you can call it with the following:

second.general();

if general is an instance then you'll have to instantiate the class first

second s = new second();
s.general();

semper fi..








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  Java code for Insert picture on the table in spreadsheet
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me
•  pls help me with this..
•  Re: Security - Code verify
•  Job @ EarlySail
•  Job @ EarlySail (perl)
•  IPC problem


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007