2진수는 1과 0으로 이루어진 수이다. 10진수는 0~9까지의 수이다. 8진수는 0~7까지의 수이다. 16진수는 0~9 A~F까지의 수이다. 단일로 나타낼 수 있는 값이 0부터 9까지이기 때문에 문자로 대체된다. n진수의 10진수로의 변환 임의의 진수를 10진수로 변환하는 방법은 쉽다. 맨 우측의 가장 작은 값을 시작으로 해서 인덱스(n)를 0으로 잡는다고 하자 만약 1100이라는 이진수가 있다면 맨마지막 값(오른쪽 첫번째)인 0의 n값은 0이고, 그 다음에 위치하는 0의 n값은 1이다. 이렇게 차례대로 2, 3......를 가지게 될 것이다. 이제 각 자리는 2진수이기 때문에 (2ⁿ x 자리값)으로 계산해서 처리해주고, 다시 그 값들을 전부 더해주면 된다. 그렇기 때문에 최종적으로 계산형태는 (1 x ..
1. 네이버 스마트 에디터 파일을 다운 받습니다. http://dev.naver.com/projects/smarteditor/ 2. 스마트 에디터 압축 푼 폴더를 프로젝트의 적절한 경로에 위치시킵니다. (저 같은 경우는 resources/하위 디렉토리에 두었음) 3. 스마트에디터를 적용할 jsp페이지에 HuskyEZCreator.js 파일(스마트에디터 폴더에 있음)을 포함시켜줍니다. 4. 스마트에디터를 적용할 jsp(VIEW)페이지에 textarea태그 밑에 보이는 스크립트처럼 넣어줍니다. 이때 textarea id와 스크립트 안에 보이는 elplaceHolder라는 객체의 값이 동일해야 합니다. 4. 다 하셨으면 스마트에디터에서 입력한 값을 불러와서 textarea태그의 내용에 집어 넣어야 됩니다. v..
증감 연산자(++, --) 피연산자의 값을 1을 더하거나 1을 빼는 연산자. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 public class OperatorTest { public static void main(String[] args) { //증감문 전위형 후위형에 대하여 int i = 0, j = 0, k = 0; //1.증감 연산자에는 전위형, 후위형이 있는데 단독으로 쓰일 경우에는 두 값이 1이 증가한다는데는 차이가 없다 //전위형 같은 경우에는 먼저 변수값을 증가하거나 감소시키기 때문에 문제가 없다 i++; ++j; System.out.println("변수 i ..