java - Can a public constructor built inside a friendly class be accessed from a different package? -


package mypackage.pack1; class packclass {   public packclass() {   system.out.println("i'm creating packaged class");   } } 

then import package containing class. can public constructor used though class not public? or need inside same package use it? couldn't try out myself because can't figure out how save package eclipse in classpath import it, if can out great. thanks

you can not access public constructor different package since class modifier default.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -