sadstephen
sadstephen
JCHJava Community | Help. Code. Learn.
Created by sadstephen on 1/19/2025 in #java-help
Can I make a superclass's variable static final in subclass?
abstract class User {
String about;
}
class Bots extend User {
final static String about = "Bots are not humans"; // I think this replaces Superclass 's instance variable about
}
abstract class User {
String about;
}
class Bots extend User {
final static String about = "Bots are not humans"; // I think this replaces Superclass 's instance variable about
}
21 replies