java lang System public static void exitint status
java. lang. System public static void exit(int status) • Аналогично вызову Runtime. get. Runtime(). exit(n). public static void gc() • Аналогично вызову Runtime. get. Runtime(). gc(). 28 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. String public String() public String(String value) public String(char[] value, int offset, int count) public String(byte[] bytes, int off, int len, String enc) public String(byte[] bytes, int off, int len) public String(byte[] bytes) public String(String. Buffer buffer) • Позволяют создать новую строку. 32 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. String public String substring(int begin. Index) public String substring(int begin. Index, int end. Index) • Возвращает подстроку. public String concat(String str) • Конкатенация строк. public String replace(char old. Char, char new. Char) • Возвращает строку после подстановки символа. public String to. Lower. Case() public String to. Upper. Case() • Возвращает строку с приведением символов к заданному регистру. 36 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. String public static String value. Of(Object obj) public static String value. Of(char[] data, int offset, int count) public static String value. Of(boolean b) public static String value. Of(char c) public static String value. Of(int i) public static String value. Of(long l) • Строковое представление аргумента. 38 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. String. Buffer public char. At(int index) • Символ в заданной позиции. public void get. Chars(int src. Begin, int src. End, char[] dst, int dst. Begin) • Получить подстроку в массив символов. public void set. Char. At(int index, char ch) • Изменить указанный символ. 41 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. String. Buffer public String. Buffer append(Object obj) public String. Buffer append(String str) public String. Buffer append(char[] str, int offset, int len) public String. Buffer append(boolean b) public String. Buffer append(char c) public String. Buffer append(int i) public String. Buffer append(long l) • Присоединить строковое значение объекта к строке. 42 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. String. Buffer public String. Buffer delete(int start, int end) public String. Buffer delete. Char. At(int index) • Удаление подстроки или символа с уменьшением длины строки. 43 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. String. Buffer public String. Buffer insert(int offset, Object obj) public String. Buffer insert(int offset, String str) public String. Buffer insert(int offset, char[] str) public String. Buffer insert(int offset, boolean b) public String. Buffer insert(int offset, char c) public String. Buffer insert(int offset, int i) public String. Buffer insert(int offset, long l) • Вставка символьного представления объекта в строку. 44 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
Классы типов данных public static byte parse. Byte(String s) public static byte parse. Byte(String s, int radix) public static short parse. Short(String s, int radix) public static int parse. Int(String s, int radix) public static long parse. Long(String s, int radix) • Возвращает значение соответствующего типа, извлеченное из строки. Можно указать основание системы счисления. 48 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. util. Vector public boolean contains(Object elem) public int index. Of(Object elem, int index) public int last. Index. Of(Object elem, int index) • Проверяет вектор на наличие заданного элемента, ищет его первое/последнее вхождение. 56 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. util. Vector public Object element. At(int index) public Object first. Element() public Object last. Element() public void set. Element. At(Object obj, int index) • Обеспечивает доступ к элементам вектора. public void remove. Element. At(int index) public void insert. Element. At(Object obj, int index) • Удаление и вставка элемента с изменением размера вектора и смещением остальных элементов. 57 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. io. Data. Input (interface), java. io. Data. Output (interface) public boolean read. Boolean() public byte read. Byte() public int read. Unsigned. Byte() public short read. Short() public int read. Unsigned. Short() public char read. Char() public int read. Int() public long read. Long() • Чтение соответствующих типов данных. Многобайтные числовые типы записываются начиная со старших байт. 73 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. io. Input. Stream. Reader и java. io. Output. Stream. Writer • Эти классы наследуются от предыдущих и обеспечивают реализацию чтения/записи символьных данных с перекодировкой. public Output. Stream. Writer(Output. Stream os) public Output. Stream. Writer(Output. Stream os, String enc) 76 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. io. Print. Stream public void print(boolean b) public void print(char c) public void print(int i) public void print(long l) public void print(char[] s) public void print(String s) public void print(Object obj) public void println(boolean x). . . • Выдает строковое представление значений. 78 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. util. Calendar public final Date get. Time() public final void set. Time(Date date) protected long get. Time. In. Millis() protected void set. Time. In. Millis(long millis) • Чтение и установка времени. public final int get(int field) public final void set(int field, int value) • Чтение и установка конкретного поля даты. public void set. Time. Zone(Time. Zone value) • Установка заданного часового пояса. 81 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
java. lang. Math • Реализует некоторые целочисленные математические функции. public static int abs(int a) public static long abs(long a) public static int max(int a, int b) public static long max(long a, long b) public static int min(int a, int b) public static long min(long a, long b) 87 (с) ИТЛаб, ННГУ, ВМК, 2003 г Java 2 Micro Edition Жерздев С. В.
- Slides: 92