Skip to content

Latest commit

 

History

History
55 lines (48 loc) · 4.4 KB

java.md

File metadata and controls

55 lines (48 loc) · 4.4 KB

java programming ebook

hello world!

public class Java {
	public static void main(String[] args) {
		System.out.println("Hello World");
	}
}

java android

package com.example.helloworld;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class HelloWorld extends Activity {
   /** Called when the activity is first created. */
   @Override
   public void onCreate(Bundle savedInstanceState) {
       super.onCreate(savedInstanceState);
       TextView tv = new TextView(this);
       tv.setText("Hello World");
       setContentView(tv);
   }
}