Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within OCPJP
Search Coderanch
Advance search
Google search
Register / Login
Win a copy of
Spring Boot in Practice
this week in the
Spring
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
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Ron McLeod
Jeanne Boyarsky
Paul Clapham
Sheriffs:
Liutauras Vilda
Henry Wong
Devaka Cooray
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Al Hobbs
Carey Brown
Bartenders:
Piet Souris
Mikalai Zaikin
Himai Minh
Forum:
Programmer Certification (OCPJP)
Inner Class....
Shiaber Shaam
Ranch Hand
Posts: 252
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
public class A
{
public class B
{
public void meth()
{
}
}
}
public class C
{
public static void main(
String
args[])
{
A.B b1 = new A().new B();
b1.meth();
}
}
Is it right.....
$Hi/\bEr
Marino Christe
Greenhorn
Posts: 17
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
logically the code is rite. if u wanna place both classes in a file, then u shud remove the public access modifier for the class A. but for tat evrything is rite
Shiaber Shaam
Ranch Hand
Posts: 252
posted 16 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
is it right to invoke the inner class method using the inner class object alone(Outside outer class)....
$Hi/\bEr
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
What output do you expect and WHY about the following code?
Inheritance
abstrct inner classes
which method is invoked and why?
Inheritance
More...