Class.forName("..."), JVM подгружает этот класс и вызывает статический инициализатор этого класса. В случае с JDBC драйверами они, как правило, там вызывают статический метод DriverManager.registerDriver(...) и регистрируют сами себя (пример для mysql). Регистрация представляет собой просто сохранение во внутреннем статическом списке. Далее, когда вы вызываете DriverManager.getConnection(jdbcUrl), DriverManager по этой jdbcUrl ищет подходящий драйвер (дёргая метод acceptsURL, который должны реализовывать все драйверы), далее подключается с помощью метода connect этого драйвера. Конечно, есть ещё много нюансов, особенно если касаться web приложений.Class.forName("...").newInstance() я не видел, это вроде ничем не отличается от просто new com.mysql.jdbc.Driver().MOV DX, 2000 ; Number of times to repeat whole routine.
MOV BX, 1 ; Frequency value.
MOV AL, 10110110B ; The Magic Number (use this binary number only)
OUT 43H, AL ; Send it to the initializing port 43H Timer 2.
NEXT_FREQUENCY: ; This is were we will jump back to 2000 times.
MOV AX, BX ; Move our Frequency value into AX.
OUT 42H, AL ; Send LSB to port 42H.
MOV AL, AH ; Move MSB into AL
OUT 42H, AL ; Send MSB to port 42H.
IN AL, 61H ; Get current value of port 61H.
OR AL, 00000011B ; OR AL to this value, forcing first two bits high.
OUT 61H, AL ; Copy it to port 61H of the PPI Chip
; to turn ON the speaker.
MOV CX, 100 ; Repeat loop 100 times
DELAY_LOOP: ; Here is where we loop back too.
LOOP DELAY_LOOP ; Jump repeatedly to DELAY_LOOP until CX = 0
INC BX ; Incrementing the value of BX lowers
; the frequency each time we repeat the
; whole routine
DEC DX ; Decrement repeat routine count
CMP DX, 0 ; Is DX (repeat count) = to 0
JNZ NEXT_FREQUENCY ; If not jump to NEXT_FREQUENCY
; and do whole routine again.
; Else DX = 0 time to turn speaker OFF
IN AL, 61H ; Get current value of port 61H.
AND AL, 11111100B ; AND AL to this value, forcing first two bits low.
OUT 61H, AL ; Copy it to port 61H of the PPI Chip
; to turn OFF the speaker.inline int getRandomNumber(int start, int end) {
return start + rand() % (end - start);
}