[Java] 왜 InputStream 의 read() 는 byte 가 아닌 int 를 반환하는가?
자바, 왜 InputStream 의 read() 는 byte 가 아닌 int 를 반환하는가? byte 는 8bit 로 0~255 까지 표현할 수 있다. 그런데 InputStream 의 read() 를 통해 더 읽어들일 byte 가 없을 경우에는 -1 을 return 하여 더 이상 읽을 값이 없다는 것을 알려줘야 한다. 이 경우 byte 형으로 return 받을 경우 -1 을 포함시킬 수가 없다. 그래서 int 형태를 사용하게 되었다. 1, byte, InputStream, inputstream int return read, inputstream read, inputstream read byte, inputstream read byte return, inputstream read int, iNT, Java..
2013. 8. 18.
[VB6] Built-in Function 들에 대해 공부해보자. ( MsgBox, Input, Math 함수, Formating 함수, String 함수 )
Built-in Function 들에 대해 공부해보자. [이전강좌] Control 문들에 대해 공부해보자. ( If Else, Select, Do while, For문 ) Dialog Box 들 returnValue = MsgBox( PromptStr, StyleValue, Title ) StlyeValue Constant0 vbOkOnly 1 vbOkCancel 2 vbAbortRetryIgnore 3 vbYesNoCancel 4 vbYesNo 5 vbRetryCancel StyleValue 에는 다음의 값을 더해서, icon 도 함께 표시할 수 있다. StyleValue Constant 16 vbCritical 32 vbQuestion 48 vbExclamation 64 vbInformation Re..
2013. 6. 5.