Pankaja Shinde

Ranch Hand
+ Follow
since Sep 15, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Pankaja Shinde

There are two legitimate uses.

One is to act as a "safety net" in case the owner of an object forgets to call its explicit termination method. While there's no guarantee that the finalizer will be invoked promptly, it may be better to free the resource late than never, in those (hopefully rare) cases when the client fails to call the explicit termination method.

A second legitimate use of finalizers concerns objects with native peers. A native peer is a native object to which a normal object delegates via native methods. Because a native peer is not a normal object, the garbage collector doesn't know about it and can't reclaim it when its Java peer is reclaimed. A finalizer is an appropriate vehicle for performing this task, assuming the native peer holds no critical resources
3 years ago
Code is working fine for me.
3 years ago
Finalize:- It is a method present in a class which is called before any of its object is reclaimed by the garbage collector. Finalize() method is used for performing code clean-up before the object is reclaimed by the garbage collector.
3 years ago
@Ifteqar Ald
Please make sure that your applications are distributable.
You can make applications distributable by adding <distributable /> tag in web.xml of application.
3 years ago
make sure your war file is not corrupted.
will you able to unzip war file (after changing file extension to zip).
3 years ago
@Veerendranag Banka
When we are uploading the war file over a slow connection, Tomcat attempts to deploy the WAR before it has finished uploading to the server.
So solution to your problem is first stop Tomcat, upload war file properly and then restart Tomcat.
3 years ago
@Robson Martinz

Both the for loop works.

But its good practice to use first one.
3 years ago

something like this

3 years ago

Campbell Ritchie wrote:

Pankaja Shinde wrote: . . . Java World. . . .

Java World? Are you sure ?



No Sir I didn't mean another forum.
I want to say, welcome to world of java.
3 years ago

Campbell Ritchie wrote:

Pankaja Shinde wrote:Following is a correct program. . . .

All the programs shown so far have been very incorrect, because they try to do everything in the main method. Cut your main method down to the two lines Winston suggests, and everything else goes elsewhere. If you had used object‑oriented programming (which nobody has even got anywhere near), you would have a much simpler program.



Yes, you are right Sir.
We need to move business logic outside of main.
I just try to modify his program to remove his logical / programmatic errors.
3 years ago
3 years ago
@Dan Good

Problem is at line 19 and 21. You should use equals and not ==.
what is difference between equals and == in java
As you initialize male variable to true, so program executing only male part.
You should study my program.
3 years ago
@Dan Good

Now check, code edited at line 18 and 20. It should work.

3 years ago
You need to study String class in detail to get the answers.

Class String
3 years ago