where do you place after you did code in java

Answers were Sorted based on User's Feedback



where do you place after you did code in java..

Answer / 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

where do you place after you did code in java..

Answer / javac

See, you can put your class files any where on hard
disk.but at the same time you have to set the path in
environmental variable for the bin folder where javac.exe
file is available.after this you can compile and run
the .class file at the location where you have stored.

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

What does it mean that a class or member is final?

0 Answers  


What is inner class?what is the use of inner class?where we create the object for inner class? and inner class can extend any class or inner class can implement any interface?

1 Answers   Wipro,


What are different types of access modifiers?

3 Answers  


Give the difference between the println method and sqrt method?

0 Answers  


Explain the difference between abstract class and interface in java?

0 Answers  


What is difference between string and stringbuffer?

0 Answers  


What are the methods of object class ?

0 Answers  


What is a dynamic array java?

0 Answers  


What is the difference between abstract classes and interfaces?

0 Answers  


what is the difference between @include page and @include file

2 Answers  


Addition to previous section relative word 5th one was Putrid ans: rotten, also there was prob. in 1st section on bucket weight ans:10kg, also there was a prob. on train speed to find bridge length ans:800 mtrs.

0 Answers   V2 Solutions,


what are the jsp tags with example?

1 Answers   Photon,


Categories