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

David chenjl

Greenhorn
+ Follow
since Jul 05, 2001
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David chenjl

that is great, thank you very much.
hello, I have a textfield to input integer, not string, how to check the input value? thank you very much.
hello, everyone,
i create a ejb project with jbuilder5, the server is weblogic6.0,but when i run the ejb using jb5, it ask me input the password to start the weblogic, after i send the password,it tell me dont find the license file of weblogic. how can i do? I am using the evolution of weblogic6.0
please give me a hand, thank you!
20 years ago
i pass the exam yesterday with 81%.
thanks, the forum is very good place to study, i cleared many troubles during the exam prepearing from the forum.
i will try my best to answer questions on it and get the help too.
there is some points must to know for who want to have the exam:
1. the thread is very very important, you must know it and the synhrionzed clearly.
2. the io is important too.
3. another acepts is easy and it is ok if you know the base knowlege.
20 years ago
please see the code:
int i=0;
i=i++;
i=i++;
i=i++;
System.out.println("i="+i); // print out i=0;
i++;
System.out.println("i="+i); // print out i=1;
I am doubled why the i is 0. what is the different between i=i++ and i++?
Anybody help me? thank you.
the SCJP time back to 120mins, and show you how many correct answers if it is a multiple question, and only need 61% score to pass it.
do it means that the exam becomes diffcult than before?
thank you very much, i understand it.
thank you every one, i have catch it.
thanks again.
code:
-------------------------------------------------------
public class Mythread implements Runnable
{
String myString = "Yes ";
public void run()
{
this.myString = "No ";
}
public static void main(String[] args)
{
Mythread t = new Mythread();
new Thread(t).start();
for (int i=0; i < 10; i++)
System.out.print(t.myString);
}
}
-------------------------------------------------------
it is a question in a mock, the right answer on mock is :
The Output cannot be determined.
but i run the code on jdk, it show me "yes yes yes ......." very time.
what's the problem, please contact me.
public class Q5 {
byte b=127;

Q5() {
this.methodA();
}

void methodA() {
System.out.println("Value of bb is = " + b );
}

public static void main(String [] args) {
Q5or p = new Q5or();
}
}

class Q5or extends Q5 {
byte b=126;

Q5or() {
System.out.println("Value of bbb = " + b);
}

void methodA() {
System.out.println("Value of b = " + this.b);
}
}
the output is:
Value of b = 0
Value of bbb = 126
i can see that bbb=126, but how b=0? please help me. by the way, will it be in real exam like that situation? I have never meet that using sub class in base calss.
you can only have static variable and method in class level.
if in a Inner class, just the Inner class is static you can have static fields in the Inner class.
but if the Inner class is a local, then it cannot!
the following code is about a inner class, the right output is "Sample", it make me confused, i think it should be nothing,
please help me!!
-----------------------------------------------------------
public final class Test4
{
class Inner
{
void test()
{
if (Test4.this.flag);
{
sample();
}
}
}
private boolean flag = false;
public void sample()
{
System.out.println("Sample");
}
public Test4()
{
(new Inner()).test();
}
public static void main(String args [])
{
new Test4();
}
}
plz see the following code:
---------------------------------------------------
class ValHold{
public int i = 10;
}
public class ObParm{
public static void main(String argv[]){
ObParm o = new ObParm();
o.amethod();
}
public void amethod(){
int i = 99;
ValHold v = new ValHold();
v.i=30;
another(v,i);
System.out.println(v.i + " "+i);
}//End of amethod
public void another(ValHold v, int i){
i=0;
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.println(v.i+ " "+i);
}//End of another
}
-------------------------------------------
the result is "10 0 20 99"
I know the primitive varialbe's change which been send as paramter to a method.
but how about a object if it is a paramter in a method,in the up code, i can see that v.i has been change to 20,if have the following code:
ValHold vh = new ValHold();
v = vh;
the reference i of v will be 20 after the another(). But object v has been assigned to vh, so, v.i should be 10,but compling result is 20, how to explain it? I am not very clear about object and object reference, Please help me.
thank you very one.
thank you, Li Yi and Scott,
So,Can I use the operator "==" to desplace the equals() to compare anything?,the == only compares the memory address that i get from turial, how can i compare two object, by equals() or another?