일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 네트워크
- VirtualBox
- Windows
- xargs
- Eclipse
- GIT
- ssh
- web.xml
- context
- netsh
- Windows 10
- IntelliJ
- profile
- find
- Mac
- vscode
- lsof
- tomcat
- JavaScript
- 줄바꿈 문자
- Quartz
- resource
- bash
- maVen
- port
- plugin
- import
- Source
- 단축키
- grep
- Today
- Total
목록Dev/Java (163)
develog
public class TestCallback { public static void main(String[] args) throws Exception { TestCallback main = new TestCallback(); main.test(new ICallBack() { public void callbackMethod() { System.out.println(">> ICallBack.callbackMethod()"); } }); } public void test(ICallBack callback) { callback.callbackMethod(); }} interface ICallBack { public void callbackMethod();}
private void findDuplicateValue(String[] list) { for (int i = 0; i " + i + ". " + str1); break; } } } }
private String generate() { int len = 6; int rnum = (int) Math.floor(Math.random() * Math.pow(10, len)); StringBuffer sb = new StringBuffer(String.valueOf(rnum)); while (sb.toString().length() < len) { sb.append("0"); } return System.currentTimeMillis() + "_" + sb.toString();}
String str1 = "ABC";String str2 = new String("ABC");String str3 = "ABC"; System.out.println("str1 : " + str1);System.out.println("str2 : " + str2);System.out.println("str3 : " + str3);System.out.println(); System.out.println("str1.toString() : " + str1.toString());System.out.println("str2.toString() : " + str2.toString());System.out.println("str3.toString() : " + str3.toString());System.out.prin..
Object obj = new Object();System.out.println("1. " + obj.toString()); System.out.print("2. ");System.out.print(obj.getClass().getName());System.out.print("@");System.out.print(Long.toHexString(System.identityHashCode(obj)));System.out.println(); // console1. java.lang.Object@1c78e572. java.lang.Object@1c78e57
Long num = 29855319L;System.out.println("10진수: " + num);System.out.println(" 2진수: " + Long.toBinaryString(num));System.out.println(" 8진수: " + Long.toOctalString(num));System.out.println("16진수: " + Long.toHexString(num)); // console10진수: 29855319 2진수: 1110001111000111001010111 8진수: 16170712716진수: 1c78e57