Answer Posted / arun
if I am wrong, you are asking, where we put our class and
java file, after coding.
It is totally depends on you. you can put in any folder.
both class file and java file can put together or separate
folder. it doesn't matter you put your source code,
because compiler only checks your class file. so if you
put your class file in some folder, you need to define java
classpath before running your code. you
but stratigies, which generally prefered by most of
developer. source code should be put in soruce folder, and
class file should be put in classes folder.
if your packege is in C:\project
then
C:\project\src\ (put java soruce file here)
C:\project\classes\ (put class file here)
and give command on cmd prompt..
C:\java -classpath C:\project\classes
so when you run your class file, it will check you classes
fodler..
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is gc()?
how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? Or extending thread class or implementing runnable interface. Which is better? : Java thread
What are jee technologies?
Is null a string in java?
Why we override equals() method?
Which sorting is used in arrays sort in java?
What is a boolean used for?
What is unicode used for?
What is difference between array and arraylist in java?
What are the benefits of operations in java?
What are synchronized blocks in java?
What is string data type?
Can list be null in java?
How do you know if a value is nan?
what is the difference between preemptive scheduling and time slicing? : Java thread