where do you place after you did code in java

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


Please Help Members By Posting Answers For Below Questions

How to run a JAR file through command prompt?

712


What will happen to the exception object after exception handling?

568


What does bitwise or mean?

563


What is byte code and why is it important to java’s use for internet programming?

591


What happens if an exception is not handled in a program?

621






Who found java?

548


Is java se free?

519


Where is jre installed?

585


How to obtain a performance profile of java program

540


Is node a data type in java?

490


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

2367


Is java a digit method?

510


What is the final method?

595


What is java used for on a computer?

505


Can there be an abstract method without an abstract class?

533