You code just created four String objects and did nothing more. If you want to print something, you need to use System.out.prin tln(). i.e.
System.out.prin tln(ouput);
By the way, do not write the following code:
s1 = new String("hello") ;
Although it works, it is not a good practice. Just write the following is enough:
s1 = "hello";
Try to read articles...
User Profile
Collapse
-
"new <classname> ()" is the call to create a new instance of class "classname" by using its default constructor.
By the way, I think "obj.<methodnam e>=new <classname> () " is incorrect. You cannot change a method of a object. It should be "obj.<attri bute name>=new <classname> () ".Leave a comment:
-
Stop Network DDE service
Had the same problem (2GB RAM, recently defraged all hard disks) and just fixed a few minutes ago.
Go to "Control Panel" -> "Administra tive Tools" -> "Services", find and stop the following services:
Network DDE
Network DDE DSDM
Note, you may be prompted that the depending services will also be stopped, e.g. "ClipBook",...Leave a comment:
No activity results to display
Show More
Leave a comment: