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 use of StringTokenizer class?

611


What is the purpose of the finalize() method?

713


How to find the given number is a prime number or not by getting input from the user

554


What is an abstract method in java programming?

607


What is final access modifier in java?

594






How do you end a program?

552


What does sprintf return?

590


What is the impact of declaring a method as final?

563


Explain importance of throws keyword in java?

564


How is it possible for two string objects with identical values not to be equal under the == operator?

528


What is a string what operation can be performed out with the help of a string?

511


How much ram can a 64 bit processor theoretically?

468


What are different data types?

570


Is there any difference between nested classes and inner classes?

540


What is printwriter in java?

520