Oracle Certified Java_silver Countermeasure Memo 1

Introduction

It's been 5 months since I started working as an engineer, and I'm about to get a qualification. .. .. So! As a countermeasure for "Oracle Certified Java SE Silver", I picked up and summarized the important points for each chapter based on the black book.

Chapter 1 Creating a simple Java program

java class name command argument 1 command argument 2...
java file name.java
java sample x "y y"z ¥" c¥"   // x , y yz , " , c" 

Chapter 2 Java Basic Data Types and String Manipulation

Base number prefix Description method display
Binary number 0b 0b01001000 80
8 base 0 077 63
Decimal number None 63 63
Hexadecimal 0x 0x3F 63
Data type value
boolean true, false
char 16-bit (Unicode \ u0000 ~ \ uFFFF)
byte 8-bit integer-128~127
short 16-bit integer −32,768〜32,767
int 32-bit integer
long 64-bit integer
float 32-bit single institutional floating point number
double 64-bit precision floating point number
String str1 = "Sample1";  //Enclose the character string with ""
String str2 = new String("Sample2"); //Create an instance of String type with new
ver = null;  //Compile error because the data type cannot be inferred
ver = {1,2,3}  //Compile error because the type cannot be assumed
ver list = new ArrayList<Object>();  //  OK
About java.lang.String method
Srting str = "hello";

System.out.printout(str.charAt(1));  // e
System.out.printout(str.charAt(5));  //Throw an exception

System.out.printout(str.indexOf("o"));  // 4
System.out.printout(str.indexOf("hello!"));  // -1

System.out.printout(str.substring(1, 3));  // el

System.out.printout(str.replace("l", "r"));  // herro
System.out.printout(str.substring("l", 'r'));  //Error due to different argument types

str2 = srt.concat(", world!" 
System.out.printout(str2);  // hello, world!

Chapter 3 Operators and Judgment Structure

Chapter 5 Array Manipulation

int[5] array  //Of the declaration[]Error because there is a numerical value in
int[5][] array  //Of the declaration[]Error because there is a numerical value in

Chapter 6 Instances and Methods

void sample(int ...a){...}  // OK
void sample(int ...a, int...b){...}  //error
void sample(int a...){...}  //error

Click here for Chapters 7-11

While editing

Recommended Posts

Oracle Certified Java_silver Countermeasure Memo 1
Oracle Certified Java Programmer, Gold SE 8