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

What is the purpose of garbage collection in java?

858


What is nested class?

770


Define locale.

819


Why is stringbuffer not immutable?

794


Difference between ‘>>’ and ‘>>>’ operators in java?

899


Is the empty set a singleton?

734


why we use merge option in hybernate pls give a ex snippet

1707


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

2031


When parseint method can be used?

736


What is the differences between heap and stack memory in java? Explain

758


Is there any difference between nested classes and inner classes?

826


What things should be kept in mind while creating your own exceptions in java?

866


java program with complete 4 oops concepts implemented example

2938


What is Major and importance difference between for and foreach loop ?

841


When do we use synchronized methods in java?

801