No, they aren't. If that was true, no non-static thing could ever exist, because all (normal) Java programs start with the main(String[])
method.
Objects are never static.
You can create classes, which are kind of, let's say, blueprints of an object:
public class Aa {
public void doSomething() { ... }
public static void doMore() { ... }
}
You can create an instance of that class (that is, an object) like this:
new Aa();
If you run a class, the Java Virtual Machine is started and it searches for the main(String[])
method. Because there is not yet any instance of an object, the method must be declared static
.
public class Main {
public static void main(String[] args) {
// Without an instance of Aa, you can only call static methods OF
// THAT CLASS:
Aa.doMore();
// This will throw a compiler error:
// non-static method doSomething() cannot be referenced from a
// static context, because the method is not declared static.
Aa.doSomething();
Aa instanceOfAa = new Aa(); // Create a new object of type Aa.
// Since we've created an instance of the class Aa (thus it is an
// object), we can call non-static methods OF THAT CLASS if we call
// the reference to it. The variable myInstanceOfAa refers to an
// instance of class Aa, thus we can call non-static methods on it,
// like this:
instanceOfAa.doSomething();
}
}
See The Java Tutorials:
Sometimes, you want to have variables that are common to all objects. This is accomplished with the static modifier. Fields that have the static modifier in their declaration are called static fields or class variables. They are associated with the class, rather than with any object. Every instance of the class shares a class variable, which is in one fixed location in memory. Any object can change the value of a class variable, but class variables can also be manipulated without creating an instance of the class.
So you don't need an instance of a class (that is, an object) in order to get it.
I suggest you read the Java Tutorials.
Memory
The memory part of your question might have been answered here.