[Help]->[About Eclipse]->[Installation Details]
2011年5月30日月曜日
Javaのfor文
for(初期化; 判定; 繰り返し処理)
for(int i = 0; i < 10; ++i) {
//処理
}
for(要素 : 配列) int[] a = new int[10];
for(int i : a) {
//処理
}
拡大鏡
先日行ったセミナーで講師の方が、Macの画面を拡大しながら説明してくれて非常に見やすかった。
Windows7でも同じようなことが出来るのかを調査。
Windows7では「拡大鏡」というツールで画面の拡大が可能。
ショートカット
拡大
[Windowsキー]+[+] or [;]
縮小
[Windowsキー]+[-]
拡大鏡の終了
[Windowsキー]+[Esc]
Windows7でも同じようなことが出来るのかを調査。
Windows7では「拡大鏡」というツールで画面の拡大が可能。
ショートカット
拡大
[Windowsキー]+[+] or [;]
縮小
[Windowsキー]+[-]
拡大鏡の終了
[Windowsキー]+[Esc]
2011年5月24日火曜日
Javaの配列
// 配列の宣言
int[] a;
// 配列の生成
a = new int[10];
// 配列の宣言・生成・初期化
char[] b = {'A', 'B', 'C'};
//char[] b = new char[]{'A', 'B', 'C'}のシンタックスシュガー
2011年5月21日土曜日
ボタンのクリックを処理する
public class TestActivity extends Activity implements OnClickListener{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button mButton = (Button)findViewById(R.id.button1);
mButton.setOnClickListener(this);
}
@Override
public void onClick(View arg0) {
//ボタンクリック時の処理
}
}
2011年5月10日火曜日
2011年5月9日月曜日
XMLにコメントを入れる
・書式
タグの中では使用できない
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<!-- これはNG -->
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</LinearLayout>
・注意
タグの中では使用できない
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<!-- これはNG -->
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
</LinearLayout>
2011年5月8日日曜日
テスト
public class HelloWorld {
public static void main (String[] args) {
System.out.println("Hello World !!");
}
}
登録:
コメント (Atom)
