You specifically mention inheriting from Object, but if you are asking about inheritance in general between children and grandchildren, then yes, B will inherit from all predecessors.
public class A{
public String getAString(){
return "Hello from A";
}
}
public class B extends A {
public String getBString(){
return getAString() + " and Hello from B.";
}
}
public class C extends B{
}
public class Main{
public static void main(String[] args){
C c = new C();
// Inherited from A Inherited from B
System.out.println(c.getAString() + "..." + c.getBString());
}
}
This gives
Hello from A...Hello from A and Hello from B.
Notice C has no code in the class body. All functionality is being inherited.
Inheriting from Object is a little special in that it is implicit. There is no need to say extends Object on any class -- it's redundant. But the inheritance mechanism is no different.