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 are the basics of core java?

751


What are the differences between processes and threads?

749


How do you do exponents in java?

765


Under what conditions is an object’s finalize() method invoked by the garbage collector?

786


Why is the singleton pattern considered to be an anti pattern?

669


When should a function throw an exception?

812


What restrictions are placed on method overloading in java programming?

768


State differences between C and Java?

875


What is a literal coding?

731


What is a parameter in java?

731


What is memory leak and how does java handle it?

741


Why is java called the platform independent programming language?

792


How do you print array in java?

736


What is the final blank variable?

796


What is hashing in java?

776