Win a copy of Rust Web Development this week in the Other Languages forum!

Sourav Sarker

Greenhorn
+ Follow
since Jul 26, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sourav Sarker

javac -cp /com/data/cour ; F.java

If you are using windows OS, First skip the First '/' because it is used in solaris for the root folder. and skip the ';' . Instead of semicolon (;) use a single space...
I think it will work fine ...

-cp or -classpath works for same . As an example. After the -cp tag you must specify the fully qualified name of the class.
So use

javac -cp com.data.cour -d . com/data/classeur/F.java

from root of com folder. -d . means where you want to save the class files...
[ simply to understand : -cp is followed by a fully classified class path and -d is followed by a directory location to store class]

Pictorially Example :

root
|
com
|
data
|
----cour
| |
| D.java & D.class
|
-----classur
|
F.java & F.class



Commands from root directory:

javac -d . com/data/cour/D.java
javac -cp com.data.cour.D -d . com/data/classur/F.java


To run :

java -cp com.data.cour.D F



I think this will work..


Oh check your code... You just import package not package Class
change that into

import com.data.cour.D
I am so sorry for that . I was in so much hurry when i was writing it. So It was skipped and i did not see that. Alam Ameghino
Consider you code :

public static void m1(Dog... ds) {
for (Dog d : ds)
d = null;
}

public static void m2(Dog[] ds) {
for (int i = 0; i < ds.length; i++)
ds[i] = null;
}



these m1() amd m2 methods are different because of it's for loop... Just see ... what happened for m1() method....
forEach loop : firstly initiates the variable d and then chage the value d to null;
so it's it like this :

a=5; b=a; b=0;

So, will the value of a change ?
of course not...

For the second m2():
for loop is working with the index (i) and assigning null to the arrays all position... So it changes....


These are the difference between ... so they are not same....

I have started reading Head First Servlets and JSP....
But didn't know , how much tasty this is!!!

Thanks for you kind information.... Hitesh Patel Patel
Thanks ...
Roel De Nijs
Thanks for the response ....
Actually I don't know the ocmjd exam system. I want to do that certification. What type of project , the exam likes .. Can you please tell me...
I would be glad....
Hello Guys ... I have passed OCJP-6 exam with 100% score ...
I don't know what is next to do ... Can you please suggest me what and how to start with OCMJD........
Don't worry Guys ... I got my Result ... I passed with 100% score ...
8 years ago
Can you please explain how ??? I am not clear about it ...
I completed ocjp-6 exam today ... But I can't see my result. What should I do .. I can't think what to do? Can anyone help me , how to see the result...
Everything is ok ... In my cartview a button see my new exam result when I clicked on this button it shows me ... This will show the result if you attended exam on 16 Nov or after that ... and a button "OK". When I press the 'ok' button ... the page is being vanished ... I can't think anymore .. Please help me ...
8 years ago

Which two are true? (Choose two.)
A. An encapsulated, public class promotes re-use.
B. Classes that share the same interface are always tightly encapsulated.
C. An encapsulated class allows subclasses to overload methods, but does NOT allow overriding methods.
D. An encapsulated class allows a programmer to change an implementation without affecting outside code.