|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Seperate files
how do you include seperate files in the main driver program that contain function definitions.
|
|
#2
|
||||
|
||||
|
Quote:
I was just going start my own thread to ask the same question. However, I have tried it using php ie include 'somefile.js'; in the header, however it doesn't work. I was wondering if there's a javascript way of doing it so the file could be called in between the javascript tags in the header. the js data I have to put in another file are a load of vars etc. Last edited by SnapCracker : September 20th, 2006 at 04:32 AM. |
|
#3
|
||||
|
||||
|
Is this a Java or Javascript question?
|
|
#4
|
||||
|
||||
|
Quote:
Oops! Wrong one sorry! Last edited by SnapCracker : September 20th, 2006 at 04:22 AM. |
|
#5
|
|||
|
|||
|
Java
how do you get the main driver program to include a seperate java file that contains function definitions so you can use those function via an object created in the main driver program ? |
|
#6
|
||||
|
||||
|
Well, each java file has to include a class. If you just want 'functions' you could make a class with static methods only. You use the import statement to include the seperate file. Will this help you? Need an example, or am I on the wrong track?
|
|
#7
|
|||
|
|||
|
i think i got it ..
i just named the java file the same as the class thanx though Class_name object = new Classname(); object.membefunction_name(); |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Seperate files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|