Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,855 questions

51,776 answers

573 users

How to declare static variable and static method in abstract class using Java

1 Answer

0 votes
abstract class Test {  
    static int i = 892;  
    static void test_method() {  
            System.out.println("abstract class Test - test_method()");  
        }  
}  
public class B extends Test {  
    public static void main (String args[]) {  
        B.test_method();  
        
        System.out.println(Test.i);  
    }  
} 



/*
run:

abstract class Test - test_method()
892

*/

 



answered Oct 4, 2019 by avibootz

Related questions

1 answer 164 views
1 answer 164 views
1 answer 179 views
2 answers 212 views
2 answers 313 views
313 views asked Jul 4, 2017 by avibootz
1 answer 119 views
...