F
F
F0Xxx2019-06-29 20:12:50
Android
F0Xxx, 2019-06-29 20:12:50

Running a code called void, how do you run functions in delphi for example?

Hello everyone, how to run the code?

public static void main(String[] args) throws Exception {
       int c;
       String str = "btc.ru";
       URL hp = new URL(str);
       URLConnection hpCon = hp.openConnection();

       hpCon.setDoOutput(false);
       hpCon.setDoInput(true);
       hpCon.connect();
       InputStreamReader in = new InputStreamReader(hpCon.getInputStream());
       BufferedReader br = new BufferedReader(in);
       String line = "";
       System.out.print("Ok");
       while ((line = br.readLine()) != null) {
           System.out.println(line);

       }
   }

for example code
public void Message()
    {
       messagebox(123);
    }

I start by writing
protected void onCreate(Bundle savedInstanceState) {
        
           Message(); /////// это
    }

tried on advice
protected void onCreate(Bundle savedInstanceState) {
        main(); 
          
    }

highlights the brackets in red, I have never written in java, you can say, without a clue what, how, where
do you need to specify something in the brackets?
I'm trying to google the code that would write the website code into the string html variable so that it looks
something like this
public void Message() 
    {
String http = "";
http:=  send.get:= '123.ru';
      showmassage(http); // в переменной http код html страницы
    }

figurative code

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question