Programming Language

+ ๊ฐ์ฒด ๋‚ ์งœ ์–ป๋Š” ๋ช…๋ น์–ด: Calendar.getInstance() int year = now.get(Calendar.YEAR); int month = now.get(Calendar.MONTH) + 1; int day = now.get(Calendar.DAY_OF_MONTH); int week = now.get(Calendar.DAY_OF_WEEK); int hour = now.get(Calendar.HOUR); int minute = now.get(Calendar.MINUTE); int second = now.get(Calendar.SECOND); 1. ์—ด๊ฑฐ ํƒ€์ž…(Enum) : ์—ด๊ฑฐ ์ƒ์ˆ˜(enumeration constant) ์ค‘์—์„œ ์ƒ์ˆ˜๋ฅผ ์ €์žฅํ•˜๋Š” ํƒ€์ž… ์—ด๊ฑฐ ์ƒ์ˆ˜๋Š” ๋ชจ๋‘ ๋Œ€๋ฌธ์ž๋กœ ์ž‘์„ฑํ•˜๋Š” ๊ฒƒ์ด ๊ด€๋ก€..
1. ๊ธฐ๋ณธ ํƒ€์ž… VS ์ฐธ์กฐ ํƒ€์ž… ๊ธฐ๋ณธ ํƒ€์ž…: byte, char, short, int, long, float, double, boolean ๋ณ€์ˆ˜๊ฐ€ ์‹ค์ œ ๊ฐ’์„ ๋ณ€์ˆ˜ ์•ˆ์— ์ €์žฅ -> ์Šคํƒ ์˜์—ญ์— ์ง์ ‘ ๊ฐ’์„ ๊ฐ€์ง ์ฐธ์กฐ ํƒ€์ž…: ๋ฐฐ์—ด, ์—ด๊ฑฐ, ํด๋ž˜์Šค, ์ธํ„ฐํŽ˜์ด์Šค ๋ณ€์ˆ˜๊ฐ€ ๋ฉ”๋ชจ๋ฆฌ ๋ฒˆ์ง€๋ฅผ ๋ณ€์ˆ˜ ์•ˆ์—( ์ €์žฅ ( ex. String type) -> ํž™ ์˜์—ญ์˜ ๊ฐ์ฒด ์ฃผ์†Œ ๊ฐ€๋ฆฌํ‚ด -> ๋ฌธ์ž์—ด์ด ์ง์ ‘ ๋ณ€์ˆ˜์— ์ €์žฅ๋˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ, ๋ฌธ์ž์—ด์€ String ๊ฐ์ฒด๋กœ ์ƒ์„ฑ๋˜๊ณ  String ๊ฐ์ฒด๋ฅผ ์ฐธ์กฐํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ์ฆ‰, String a = "์•ˆ๋…•";์ด๋ผ๋Š” ์ฝ”๋“œ์—์„œ๋Š” ์•ˆ๋…•์€ String ๊ฐ์ฒด๋กœ ์ƒ์„ฑ๋˜์–ด์„œ ํž™ ์˜์—ญ์— ์ €์žฅ ๋˜๊ณ , a๋Š” ์Šคํƒ ์˜์—ญ์— ์ €์žฅ๋˜์–ด "์•ˆ๋…•" ํž™ ์˜์—ญ์˜ ๋ฒˆ์ง€๋ฅผ ์ €์žฅํ•œ๋‹ค. 2. ๋ฉ”๋ชจ๋ฆฌ ์‚ฌ์šฉ ์˜์—ญ(Runtime Data A..
1. Math.random() * n Math.random() * n ์—์„œ, (int) Math.random() * 10์€ 1์—์„œ 10๊นŒ์ง€์˜ ์ •์ˆ˜ ์ค‘์—์„œ ๋žœ๋คํ•œ ์ˆซ์ž๋ฅผ ๊ฐ€์งˆ ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ด๋‹ค. public static void main(String args[]) { System.out.println("๋กœ๋˜ ๋ฒˆํ˜ธ ์ƒ์„ฑ ํ”„๋กœ๊ทธ๋žจ"); for(int i=0; i
์—ฐ์‚ฐ์ž ์ค‘์—์„œ ํ—ท๊ฐˆ๋ฆฌ๊ฑฐ๋‚˜, ๋‹ค์‹œ ๋ด์•ผํ•˜๋Š” ๋ถ€๋ถ„๋งŒ ์ •๋ฆฌํ•œ ๊ฒƒ์ด๋‹ค. 1. ์ฆ๊ฐ ์—ฐ์‚ฐ์ž ์—ฐ์‚ฐ์‹ ์„ค๋ช… ++ ํ”ผ์—ฐ์‚ฐ์ž ์—ฐ์‚ฐ ์ˆ˜ํ–‰ ์ „ +1 -- ํ”ผ์—ฐ์‚ฐ์ž ์—ฐ์‚ฐ ์ˆ˜ํ–‰ ์ „ -1 ํ”ผ์—ฐ์‚ฐ์ž ++ ์—ฐ์‚ฐ ์ˆ˜ํ–‰ ํ›„ +1 ํ”ผ์—ฐ์‚ฐ์ž -- ์—ฐ์‚ฐ ์ˆ˜ํ–‰ ํ›„ -1 public static void main(String args[]) { int x = 1; int y = 1; int a = ++x + 11; // 13 int b = y++ + 11; // 12 System.out.println("if x=1, ++x + 11: " + a); System.out.println("if y=1, y++ + 11: " + b); System.out.println("x: " + x); //2 System.out.println("y: " + y); ..
โ€ป ํ—ท๊ฐˆ๋ฆฌ๊ฑฐ๋‚˜ ๋ชจ๋ฅด๋Š” ๋ถ€๋ถ„๋งŒ ์ฐพ์•„์„œ ๊ณต๋ถ€, ๊ฐ„๋‹จํ•œ ๊ฒƒ์€ ๊ฐ„๋‹จํžˆ ๊ณต๋ถ€ํ•˜๊ณ  ์ง€๋‚˜๊ฐ€๊ธฐ 1. ๋ณ€์ˆ˜ ๊ฐ’ ์ถœ๋ ฅ(System.out.printf) ํ˜•์‹ํ™” ๋œ ๋ฌธ์ž์—ด ์„ค๋ช… ์ถœ๋ ฅํ˜•ํƒœ ์ •์ˆ˜ %d %6d %-6d %06d ์ •์ˆ˜ 6์ž๋ฆฌ ์ •์ˆ˜, ์™ผ์ชฝ ๋นˆ์ž๋ฆฌ ๊ณต๋ฐฑ 6์ž๋ฆฌ ์ •์ˆ˜, ์˜ค๋ฅธ์ชฝ ๋นˆ์ž๋ฆฌ ๊ณต๋ฐฑ 6์ž๋ฆฌ ์ •์ˆ˜, ์™ผ์ชฝ ๋นˆ์ž๋ฆฌ 0์œผ๋กœ ์ฑ„์›€ 111 ---111 111--- 000111 ์‹ค์ˆ˜ %10.2f %-10.2f %010.2f ์†Œ์ˆ˜์  7์ž๋ฆฌ, ์†Œ์ˆ˜์  ์ดํ•˜ 2์ž๋ฆฌ, ์™ผ์ชฝ ๋นˆ ์ž๋ฆฌ ๊ณต๋ฐฑ ์†Œ์ˆ˜์  7์ž๋ฆฌ, ์†Œ์ˆ˜์  ์ดํ•˜ 2์ž๋ฆฌ, ์˜ค๋ฅธ์ชฝ ๋นˆ์ž๋ฆฌ ๊ณต๋ฐฑ ์†Œ์ˆ˜์  7์ž๋ฆฌ, ์†Œ์ˆ˜์  ์ดํ•˜ 2์ž๋ฆฌ, ์™ผ์ชฝ ๋นˆ ์ž๋ฆฌ 0์œผ๋กœ ์ฑ„์›€ ----111.1 111.1- 0000111.1 ๋ฌธ์ž์—ด %s %6s %-6s ๋ฌธ์ž์—ด 6์ž๋ฆฌ ๋ฌธ์ž์—ด, ์™ผ์ชฝ ๋นˆ ์ž๋ฆฌ ๊ณต๋ฐฑ 6์ž๋ฆฌ ๋ฌธ..
์š”์ฆˆ์Œ ์›น ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ณต๋ถ€ ๋“ฑ์„ ์ง„ํ–‰ํ•˜๋ฉด์„œ Java๋ฅผ ๊ณต๋ถ€๋ฅผ ํ•˜์ง€ ์•Š์•„ ๊ฑฐ์˜ ๊นŒ๋จน์€ ์ƒํƒœ๊ฐ€ ๋˜์—ˆ๋‹ค,, ๋ธ”๋กœ๊ทธ์— ๊ฐœ๋…๊ณผ ์ฝ”๋“œ๋ฅผ ์˜ฌ๋ฆฌ๋ฉด์„œ ์‰ฌ์šด ๋ถ€๋ถ„์€ ๋น ๋ฅด๊ฒŒ ๋ณต์Šตํ•˜๊ณ  ์–ด๋ ต๊ณ  ๊ณต๋ถ€ํ•˜์ง€ ๋ชปํ–ˆ๋˜ ๋ถ€๋ถ„์€ ์‹ฌํ™”์ ์œผ๋กœ ๋ณต์Šตํ•˜๋ฉด์„œ ํŒจํ„ด ์ค‘์‹ฌ์  ์‚ฌ๊ณ ์™€ ํ”„๋กœ๊ทธ๋ž˜๋ฐ์—์„œ ์‚ฌ์šฉํ•˜๋Š” Swing ์„ ๋นจ๋ฆฌ ์ตํžˆ๊ณ ์ž ํ•œ๋‹ค. 1. ์ž๋ฐ” ํ”„๋กœ๊ทธ๋žจ ๊ฐœ๋ฐœ Java๋Š” Byte ์ฝ”๋“œ๋กœ ํŒŒ์ผ์„ ๊ตฌ์„ฑํ•œ๋‹ค. ์ด๋Š” OS(Operating System, ์šด์˜์ฒด์ œ)์—์„œ ๋ฐ”๋กœ ์ธ์‹์ด ๋  ์ˆ˜ ์—†๊ณ  JVM(Java Virtual Machine)์„ ํ†ตํ•ด ๋ฒˆ์—ญ์„ ํ•˜์—ฌ ์ธ์‹์ด ๋œ๋‹ค. ์ฆ‰, Java๋Š” OS์— ๋…๋ฆฝ์ ์ด๋‹ค. OS๋Š” Window, Linux ์ฒ˜๋Ÿผ ๋งŽ์€ ์ข…๋ฅ˜๋กœ ๋‚˜๋‰˜๊ฒŒ ๋˜๋Š”๋ฐ, OS ์ข…๋ฅ˜์— ์ƒ๊ด€ ์—†์ด Java์— ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜๊ณ  JVM์„ ํ†ตํ•ด OS ์ „์šฉ ๊ธฐ๊ณ„์–ด๋กœ ..
1. HTML rel ์†์„ฑ ( tag) ๊ณผ๊ฑฐ CSS ๊ณต๋ถ€ํ•˜๋ฉด์„œ stylesheet๋ฅผ ๊ณต๋ถ€ํ•ด๋ดค๊ณ , W3School์—์„œ ๋‚˜์˜ค๋Š” Favicon ์˜ˆ์ œ์—์„œ๋Š” icon์„ ์‚ฌ์šฉํ–ˆ๋‹ค. [์ถœ์ฒ˜] http://tcpschool.com/html-tag-attrs/link-type 2. HTML Table Tag - ํ…Œ์ด๋ธ” ์ƒ์„ฑ ํƒœ๊ทธ ์„ค๋ช… ํ…Œ์ด๋ธ” tag ํ…Œ์ด๋ธ” header ํ…Œ์ด๋ธ” ํ–‰ ํ…Œ์ด๋ธ” ์—ด - ํ…Œ์ด๋ธ” ์†์„ฑ ์†์„ฑ๋ช… ์†์„ฑ ๊ฐ’ ์„ค๋ช… align left, center, right ํ…Œ์ด๋ธ” ์ •๋ ฌ ๋ฐฉ๋ฒ• bdcolor rgb(x,x,x), #xxxx, ์ƒ‰์ƒ ๋ช… ํ…Œ์ด๋ธ” ๋ฐฐ๊ฒฝ์ƒ‰ border 1, 0 ํ…Œ๋‘๋ฆฌ ์‚ฌ์šฉํ• ์ง€ ์•ˆํ• ์ง€ cellingpadding ํ”ฝ์…€ ์…€ ๊ฒฝ๊ณ„ ์‚ฌ์ด์˜ ๊ณต๊ฐ„ cellspacing ํ”ฝ์…€ ์…€๊ณผ ์…€ ์‚ฌ์ด์˜ ๊ณต๊ฐ„ frame voi..
- HTML Picture Element tag tag๋Š” ๋‹จ๋…์œผ๋กœ๋„ ์‚ฌ์šฉ์ด ๊ฐ€๋Šฅํ•˜์ง€๋งŒ, picture์˜ ํ•˜์œ„ ํƒœ๊ทธ๋กœ๋„ ์‚ฌ์šฉ ๋‹จ๋…์œผ๋กœ ์‚ฌ์šฉํ•˜๋Š” ํƒœ๊ทธ๋„ ์ œํ•œ์ ์œผ๋กœ ๋ฐ˜์‘ํ˜• ๋ ˆ์ด์•„์›ƒ์„ ์ง€์› ํƒœ๊ทธ์˜ "srcset" ์†์„ฑ์„ ์ด์šฉํ•˜๋ฉด ์›น ๋ธŒ๋ผ์šฐ์ € ๋„ˆ๋น„ ๋ณ€๊ฒฝ์— ๋งž์ถฐ ์ ์ ˆํ•œ ์ด๋ฏธ์ง€ ํŒŒ์ผ์ด ๋กœ๋”ฉ๋˜์–ด ๊ฐ€๋ณ€ ํฌ๊ธฐ๋กœ ํ‘œ์‹œe๋จ. tag ๋ฐ˜์‘ํ˜• ์›น ์ด๋ฏธ์ง€๋ฅผ ๊ตฌํ˜„ ์š”์†Œ์˜ ๋‹ค์ค‘ ์ด๋ฏธ์ง€ ๋ฆฌ์†Œ์Šค(multiple image sources)๋ฅผ ์œ„ํ•œ ์ปจํ…Œ์ด๋„ˆ ์ •์˜์‹œ ์‚ฌ์šฉ ํƒœ๊ทธ๋Š” ํ•˜์œ„ ํƒœ๊ทธ์ธ , ํƒœ๊ทธ๋ฅผ ๊ฐ์‹ธ๋Š” ๋ž˜ํผ ์—ญํ• ๋งŒ์„ ํ•˜๋ฉฐ, ์‹ค์ œ ๋ชจ๋“  ๋ฐ˜์‘ํ˜• ์ด๋ฏธ์ง€ ์ •๋ณด๋Š” ํƒœ๊ทธ์˜ ํ•˜์œ„ ํƒœ๊ทธ์ธ ํƒœ๊ทธ๋ฅผ ํ†ตํ•ด ํ‘œํ˜„ w3schools์˜ ๋ง์„ ์ธ์šฉํ•˜๋ฉด Bandwidth If you have a small screen or device, it is not neces..
- HTML map & area tag shape ์ข…๋ฅ˜ rect : ์ง์‚ฌ๊ฐํ˜• circle : ์› poly : ํ˜• ์˜์—ญ default : ์ „์ฒด ์˜์—ญ coords : ์ •์˜, ์ขŒํ‘œ๋ฅผ ํ‘œ์‹œ HTML Map tag Example JS Script ์‚ฌ์šฉ HTML Map tag Example - HTML Background image Inline CSS ์•ˆ๋…•ํ•˜์„ธ์š” ์ด๊ฑด ๋ฌดํ•œ๋„์ „ ์งค์ž…๋‹ˆ๋‹น ์•ˆ๋…•ํ•˜์„ธ์š” ์ด๊ฑด ๋ฌดํ•œ๋„์ „ ์งค์ž…๋‹ˆ๋‹น ์•ˆ๋…•ํ•˜์„ธ์š” ์ด๊ฑด ๋ฌดํ•œ๋„์ „ ์งค์ž…๋‹ˆ๋‹น ์•ˆ๋…•ํ•˜์„ธ์š” ์ด๊ฑด ๋ฌดํ•œ๋„์ „ ์งค์ž…๋‹ˆ๋‹น Internal CSS ์•ˆ๋…•ํ•˜์„ธ์š” ์ด๊ฑด ๋ฌดํ•œ๋„์ „ ์งค์ž…๋‹ˆ๋‹น background-img๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ํŽ˜์ด์ง€์— ์—ฌ๋Ÿฌ ์‚ฌ์ง„์ด ๋œจ๋Š”๋ฐ, ์ด๋ฅผ ํ•˜๋‚˜๋กœ ๋œจ๊ฒŒ ํ•˜๋Š” ๋ฐฉ๋ฒ•์€ background-repeat: no-repeat์„ ์‚ฌ์šฉํ•˜๋ฉด ๋œ๋‹ค. ์•ˆ๋…•ํ•˜์„ธ..
- HTML Colors CSS tag ์˜์‚ฌ ํด๋ž˜์Šค a: link -> ๋งํฌ ์ฒซ ๋ฐฉ๋ฌธ ์‹œ ์ƒํƒœ a: visited - ๋งํฌ ๋ฐฉ๋ฌธ ํ›„ ๋งํฌ ์ƒํƒœ a: hover -> ๋งˆ์šฐ์Šค ํด๋ฆญ ์ „ a: active -> ๋งˆ์šฐ์Šค ํด๋ฆญ ํ›„ click - HTML Bookmarks open chapter 2 open chapter 5 Chapter 1 this chapter is Chapter 2 this chapter is Chapter 3 this chapter is Chapter 4 this chapter is Chapter 5 this chapter is Chapter 6 this chapter is Chapter 7 this chapter is - HTML Image Height, Width Inline CSS In..
chaerlo127
'Programming Language' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก (3 Page)