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
Can a constructor be protected?
List some features of the abstract class.
Which sort is best in java?
Define linked list and its features with signature?
How can we make a class virtual?
What is the difference between public, private, protected, and friend access?
define the terminology association.
Explain the significance of class loaders in bootstrap?
What is linkedlist in java?
Is a boolean 1 bit?
What is meant by anonymous class?
How many types of equations are there?
Can we override a variable in java?
Explain the difference between association, aggregation and inheritance relationships.
What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?