top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

If we extends the 1 class then which class 1 loaded into memory Base class or Derived class?

+1 vote
57 views
If we extends the 1 class then which class 1 loaded into memory Base class or Derived class?
posted Sep 12, 2014 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

If we extends the one class then which class 1st loaded into memory Base class or Derived class?

+2 votes

I was playing around some static inner class.

    package com.tutorial; 
    public class MyUpperClass {
        private MyUpperClass () {

        }
        private static class MyStaticInnerClass{
                    private static final MyUpperClass muc = new MyUpperClass ();
        }
        public static MyUpperClass getInstance() {
            return MyStaticInnerClass.muc;
        }
    }

Now, My question is, when does MystaticInnerClass get loaded into the JVM memory?
At the time of, when MyUpperClass get loaded or getInstance() get called?

+1 vote

How object class is inherited into all the Java class without having extends Keyword. I mean what is the logic for making a class to inherit to all the other classes.

0 votes
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...