Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Creation of object

 
Ranch Hand
Posts: 84
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to create object of class A which is in package pkj3 from package pkj2.  class B
 
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if I got it.

Do you mean create Class A which is in package pkj3? Which is within pkj2 which contains Class B?

So pkj3 contains Class A and pkj2 (which contains Class B)?
 
sohail hussain
Ranch Hand
Posts: 84
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Angus Ferguson wrote:I am not sure if I got it.

Do you mean create Class A which is in package pkj3? Which is within pkj2 which contains Class B?

So pkj3 contains Class A and pkj2 (which contains Class B)?

class A in package pkj3 and class B in package pkj2 and both packages are different no sub package
 
Sheriff
Posts: 7108
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using an import statement.
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that should work from Class B
 
sohail hussain
Ranch Hand
Posts: 84
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Angus Ferguson wrote:Yes that should work from Class B

I tried but error is given like this not statment
 
Rancher
Posts: 4576
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might need to show some code, and include the full error message.
 
Angus Ferguson
Ranch Hand
Posts: 1402
3
Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes please, could we see the code and error?
 
Good night. Drive safely. Here's a tiny ad for the road:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic