일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- context
- Windows
- 단축키
- Quartz
- resource
- web.xml
- vscode
- Mac
- grep
- find
- import
- 줄바꿈 문자
- GIT
- Windows 10
- plugin
- profile
- VirtualBox
- tomcat
- Eclipse
- Source
- bash
- JavaScript
- IntelliJ
- xargs
- lsof
- maVen
- 네트워크
- netsh
- port
- ssh
- Today
- Total
목록분류 전체보기 (1760)
develog
assertSame("1", "1");assertNotSame("1", "1"); assertNull("");assertNotNull(null); assertTrue(false);assertFalse(false); assertArrayEquals(expecteds, actuals);assertThat("1", 1);fail(message);
public void readXSSF() { InputStream in = null; try { File sourceFile = new File("c:/sample.xls"); in = new FileInputStream(sourceFile); Workbook wb = WorkbookFactory.create(in); Sheet sheet = wb.getSheetAt(0); for (Iterator rit = sheet.rowIterator(); rit.hasNext(); ) { Row row = rit.next(); for (Iterator cit = row.cellIterator(); cit.hasNext(); ) { Cell cell = cit.next(); System.out.print(cell ..
public void writeXSSF() { FileOutputStream fileOut = null; try { Workbook wb = new XSSFWorkbook(); Sheet sheet = wb.createSheet("new sheet"); Row row = sheet.createRow(0); Cell cell = row.createCell(0); cell.setCellValue("wefwefwefwe"); fileOut = new FileOutputStream("c:/testXSSF.xlsx"); wb.write(fileOut); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.print..
type 1----------------------------------------------------------for (Iterator rit = sheet.rowIterator(); rit.hasNext(); ) { Row row = rit.next(); for (Iterator cit = row.cellIterator(); cit.hasNext(); ) { Cell cell = cit.next(); System.out.print(cell + "\t"); } System.out.println();} type 2---------------------------------------------------------- for (Row row : sheet) { for (Cell cell : row) { ..
private static void jdbcTest() { try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@127.0.0.1:1521:SID", username, password); DatabaseMetaData metaData = conn.getMetaData(); System.out.println(metaData.getDatabaseProductVersion()); System.out.println(metaData.getDriverName()); System.out.println(metaData.getDriverVersion()); }..
Java------------------------------------- public static void exceptionTest() { System.out.println("1"); try { System.out.println("2"); throwException(); // 예외발생! System.out.println("3"); } catch (Exception e) { System.out.println("4"); } finally { System.out.println("5"); } System.out.println("6");} 결과-------------------------------------12456