原创 QuickSort

public static void quickSort(int[] arr, int L, int R){ if (L>=R) { return;

原创 Praise

public class XOGame { //打印棋盤  給定一個二維數組  (行列相同) // -1則爲 X  0表示未落子*  1表示O  p

原创 Array

/*-----數組------ 針對大量相關數據 看成一個整體 具體如何存儲的一種數據結構 類比: 數學中的數列  集合 數列 a  1.5 2 3.5 4 5 6 則數列a中的 第一個元素 可用 a1表示

原创 Operator 運算符

//賦值運算符   * 變量 = 值/變量    * int x = 10;   * x %= 3   x = x+3    *  //算術運算符   * + - * /  5%3=2 取餘數   自增

原创 打印機練習 Printer

public abstract class Printer { public String id;    public abstract void doPrint();}public class Print

原创 藉口

public class ClassA implements Itest { @Override public void doPhoto() { // TODO Auto-generated method

原创 字符串相關

String str1 = "abc"; //字符串+  是字符串的拼接 System.out.println(str1+"1234"); //字符串 和數字的互相轉換 //數字->string Str

原创 ChoiceStruct_ifElse

int x = 0;// 1 2 3 4 5 6 7 System.out.print("輸入x:"); x = Integer.parseInt(scan.nextLine()); //if 單分支 /

原创 類型轉換

//類型轉換出錯 //錯誤1   將高精度 -> 低精度// float pi = 3.14; double a = 3.1415926; float x = 2.12f; //小數後寫f表示float float pi = (float

原创 打印機練習 Photo

public abstract class Photo { String id; abstract public void doPhoto();}public class PhotoFoolStyle {}

原创 多態

public class Child extends Father{ int age = 10; String name="abc"; void disp() { System.out.println(

原创 輸入緩存問題

System.out.print("x:"); double x = scan.nextDouble(); System.out.println("|"+x+"|"); System.out.print(

原创 Hello

//一句指令   ;表示一句話的結束// System.out.println("你好世界");// System.out.println("hello world");// System.out.println("!!!!!"); /

原创 Loop_while

/*-----循環 -----   可控次數的重複執行 *  * */ /*while(判定條件){ 循環體  條件成立 執行的代碼 }  */// int n = 7;//條件 總次數// i

原创 打印機練習

import 打印機練習.printer.Printer;import 打印機練習.printer.Printer3d;import 打印機練習.printer.PrinterBW;import 打印機練習