Re: who can tell me why
- From: Tom Fredriksen <spam@xxxxxxxxx>
- Date: Wed, 29 Mar 2006 19:47:21 +0200
Oliver Wong wrote:
I was thinking of the former. Just as an example off the top of my head, maybe you're writing a class which does SQL stuff, and puts things into collections. If you write:
import java.sql.*;
import java.util.*;
You'll get a collision with the classname "Date", because there exists a java.sql.Date and a java.util.Date. If you instead wrote:
import java.sql.Connection;
import java.sql.Date;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
Only if you do not specify the package name in front of the class name when declaring the variable, would there be a problem. But I see your point though, basically there is pro and cons to the issue.
/tom
.
- Follow-Ups:
- Re: who can tell me why
- From: Monique Y. Mudama
- Re: who can tell me why
- References:
- who can tell me why
- From: weironghai@xxxxxxxxx
- Re: who can tell me why
- From: Roedy Green
- Re: who can tell me why
- From: tom fredriksen
- Re: who can tell me why
- From: Roedy Green
- Re: who can tell me why
- From: tom fredriksen
- Re: who can tell me why
- From: Roedy Green
- Re: who can tell me why
- From: tom fredriksen
- Re: who can tell me why
- From: Roedy Green
- Re: who can tell me why
- From: Tom Fredriksen
- Re: who can tell me why
- From: Oliver Wong
- Re: who can tell me why
- From: Tom Fredriksen
- Re: who can tell me why
- From: Oliver Wong
- who can tell me why
- Prev by Date: Re: What's the Best Way to Time a Program's Execution?
- Next by Date: Re: who can tell me why
- Previous by thread: Re: who can tell me why
- Next by thread: Re: who can tell me why
- Index(es):
Relevant Pages
|