Win a copy of Spring Boot in Practice this week in the Spring forum!

Ji Wang

+ Follow
since Feb 05, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ji Wang

There is no equals method for StringBuffer.

Originally posted by james gong:
read the code first,why the sb1.equals(sb2) return a false valeu?
public class TestClass
public static void main(String Args[])
StringBuffer sb1 = new StringBuffer("String");
StringBuffer sb2 = new StringBuffer("String");
String sb3 = new String("String");
String sb4 = new String("String");

System.out.println(" StringBuffer:I am reache here!");
System.out.println(" String:I am reache here!");

My first IT job was a webmaster for a few month. I wrote the first version of the corporate site,but it was replaced by a few professional HTML developers in a few weeks.
Then I configured the Apache server for the servers.
Then I moved toProject Manager, taking care our projects with customers. This lasted a few months.
After the projects were cancelled because we did not see any hope to make a penny from them, I moved to manager of operations to take care the million dollar data center and its service.
A few months later, the machines were unplugged because we did not pay the hosting service.
Then I moved to manage the operations of the company of about 50 people. Just after three months, we ran out of money and the company is closed.
All this happened in one and half years since I joined the company.
21 years ago
Some questions concerning my next move.
Having been writing programs with Fortran for numerical analysis for over ten years. Jumped to a dotcom and served management positions for one and half years. Now the startup is belly up and jobs I have experiences are difficult to come (only in some specialized companies and national labs). Also my change of industry will turn some old companies off.
Now I need to polish my programming skills for something to do in next few months or so. I cannot idle for too long.
However, I have to decide what to learn and where to go.
Telecom is quite bad.
Dotcoms are dead.
Java is also not popular to many of us.
Any suggestion for my particular situation? Continue polish Java with J2EE, EJB, Servlets, or trying something else? Will Java be still needed after six months or so?
21 years ago
Some answers:
1.Donotforget the right main should be

public staticvoid main(String[] args)
2. &sim should be ~. I think it is a type error or because the terminalcannot display it probly.
3. All the XStreams throw IOException. This is why they should be used with the try/catch block.
Very impressive score.
21 years ago
I am not so sure if I like Taoism or not, but the words people familiar with impressed me a lot. This is why I event quoted them in the frontof my thesis.
Here they are:
The Tao can be told is not the eternal Tao
The Name can be given is not the eternal Name
It is really a fascinating thought.
21 years ago
It is a good site. Thanks for the collections. It will helpyour fellow students and others to use all the online resources in a one-stop shopping fashion.
To me,some of the materials are not your work. You need give the original author the credit, at least telling people you quoted some non-HTML sources. People will appreciate your effort to rewrite them in HTML format.
Hope you can improve the site with suggestions fellow Javans.
I do not think the statement is generally true.
There are good example already by Maha.

The question looks like is for GridLayout only.
The four buttons will be added in one row, thus making accommodation to the extra buttons.
Hi Cindy:
I am expecting a warning saying that the frame cannot be trusted or there is a security violation.

Originally posted by Cindy Glass:
What warning?

With a test code below, I am trying to verify the warning for display a Frame in an Applet. However, I could not see the warning on the Frame title.
What is the problem?

import java.applet.Applet;
import java.awt.*;
public class AppletFrame extends Applet {
public void init() {
Frame f = new Frame("Frame in an Applet");
f.setBounds(10, 10, 100, 100);
In many books (Core Java, H&R, etc), there are only 51 Java keywords. But I just found in Java in a Nutshell (2nd Ed) there are more like:
byvalue, future, generic, inner, operator, outer, rest, var
What should be the answer if one of them appear in the Exam?
Ji Wang
The WindowAdapter class is abstract, but the implementation here is based on the anonymous inner classes. It just extended the WindowAdapter to have a new class.
So basically the WindowAdapter is extended, not instantiated.
Hope this helps.