Calling Method in Android

后端 未结 3 1038
遥遥无期
遥遥无期 2021-01-25 17:33

I am trying to call a method I have written. It compiles except for one line...

public class http extends Activity {

httpMethod();            //will not compile         


        
3条回答
  •  长情又很酷
    2021-01-25 18:11

    httpMethod();       
    

    should be inside some other method/constructor (or) assigned to variable. I suspect your requirement might be calling calling httpMethod() in either onCreate() (or) onResume() because you are extending Activity.

提交回复
热议问题