• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Importing packages with naming conflicts (Java OCA 8 Programmer I Study Guide, Sybex)

 
Simon Shi
Greenhorn
Posts: 2
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to get the Java OCA Certification and am reading the book. On page 12, there is a section where you import java.util.*; and java.sql.*;
I typed that and my code still compiles even though the book says it does not compile. Can someone please explain why?
Thanks
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Simon Shi,

First of all, a warm welcome to CodeRanch!

Simon Shi wrote:I am trying to get the Java OCA Certification and am reading the book. On page 12, there is a section where you import java.util.*; and java.sql.*;
I typed that and my code still compiles even though the book says it does not compile. Can someone please explain why?

Did you typed the complete code snippet? So including the class Conflicts?

Kind regards,
Roel
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simon Shi wrote:I am trying to get the Java OCA Certification and am reading the book. On page 12, there is a section where you import java.util.*; and java.sql.*;
I typed that and my code still compiles even though the book says it does not compile. Can someone please explain why?

In this topic another rancher has doubts too about exactly the same code snippet. So that's definitely worth reading as well!
 
Simon Shi
Greenhorn
Posts: 2
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Simon Shi wrote:I am trying to get the Java OCA Certification and am reading the book. On page 12, there is a section where you import java.util.*; and java.sql.*;
I typed that and my code still compiles even though the book says it does not compile. Can someone please explain why?

In this topic another rancher has doubts too about exactly the same code snippet. So that's definitely worth reading as well!

Thank you so much Roel De Nijs!! This really helps!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic