Language/Java

[Java] Java ์–ธ์–ด์˜ ํŠน์ง•๊ณผ C/C++๊ณผ์˜ ์ฐจ์ด์ 

meeeeejin 2021. 4. 24. 18:05

๋ชฉ์ฐจ

  • Java์˜ ์—ญ์‚ฌ
  • ๊ฐ์ฒด์ง€ํ–ฅ ์–ธ์–ด์˜ ๊ณ„๋ณด
  • C/C++๊ณผ Java ๋น„๊ต

 

Java์˜ ์—ญ์‚ฌ

  • Java๋ž€ ์ฌ ๋งˆ์ดํฌ๋กœ์‹œ์Šคํ…œ์ฆˆ(Sun Microsystems, ํ˜„์žฌ ์˜ค๋ผํด์— ์ธ์ˆ˜๋จ)์˜ ์ œ์ž„์Šค ๊ณ ์Šฌ๋ง(James Gosling)๊ณผ ๋‹ค๋ฅธ ์—ฐ๊ตฌ์›๋“ค์ด ๊ฐœ๋ฐœํ•œ ๊ฐ์ฒด ์ง€ํ–ฅ์  ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด
  • ์ฒ˜์Œ์—๋Š” ๊ฐ€์ „ ์ œํ’ˆ(TV ๋“ฑ) ๋‚ด์— ํƒ‘์žฌํ•ด ๋™์ž‘ํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์„ ์œ„ํ•œ ์–ธ์–ด๋ฅผ ๊ฐœ๋ฐœํ•˜๋ ค ํ–ˆ์Œ
  • C/C++์€ ํ”„๋กœ์ ํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๊ธฐ์— ๋ฌธ์ œ์ ์ด ๋งŽ๋‹ค๊ณ  ์ƒ๊ฐ๋˜์–ด Java๋ฅผ ๊ฐœ๋ฐœํ•จ

 

 

 

 

๊ฐ์ฒด์ง€ํ–ฅ ์–ธ์–ด์˜ ๊ณ„๋ณด

์ถœ์ฒ˜: https://slidesplayer.org/slide/17188696/

 

 

 

 

C/C++๊ณผ Java์˜ ๋น„๊ต

C/C++์˜ ๋ฌธ์ œ์  Java
๊ฐ์ฒด ์ƒ์„ฑ๊ณผ ์ œ๊ฑฐ delete ํ‚ค์›Œ๋“œ ์ œ๊ฑฐ
=> ๊ฐ์ฒด์˜ ์ œ๊ฑฐ๋ฅผ ์ž๋ฐ” ์‹คํ–‰ ํ™˜๊ฒฝ์—๊ฒŒ ๋งก๊ฒจ์„œ
๋ฉ”๋ชจ๋ฆฌ ๋ˆ„์ˆ˜๋ฅผ ์ค„์ž„
์ฐธ์กฐ ๋ณ€์ˆ˜์™€ ํฌ์ธํ„ฐ ๋ณ€์ˆ˜ ๊ฐ์ฒด์˜ ํฌ์ธํ„ฐ ์ œ๊ฑฐ
์ด์ฐจ ์ด์ƒ์˜ ํฌ์ธํ„ฐ ๋ฌธ์ œ ๋ชจ๋“  ํฌ์ธํ„ฐ ์ œ๊ฑฐ
๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๋ฅผ ์ •์˜ํ•˜๋Š” ๋‘ ๊ฐ€์ง€ ๋ฐฉ๋ฒ• struct ํ‚ค์›Œ๋“œ ์ œ๊ฑฐ
ํ•จ์ˆ˜์ง€ํ–ฅ, ๊ฐ์ฒด์ง€ํ–ฅ ๋ชจ๋‘ ๊ฐ€๋Šฅ ํ•จ์ˆ˜๋Š” ์บก์Šํ™”ํ•ด์„œ ๋ฉ”์†Œ๋“œ๋กœ๋งŒ ์‚ฌ์šฉํ•˜๋„๋ก ์ œ์•ฝ
=> ์™„์ „ํ•œ ๊ฐ์ฒด์ง€ํ–ฅ์–ธ์–ด
์ปฌ๋ ‰์…˜(Collection)์˜ ๋ถ€์žฌ
=> ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉํ–ˆ์Œ
์–ธ์–ด์— ์ปฌ๋ ‰์…˜(Collection) ํฌํ•จ
๊ธ€๋กœ๋ฒŒํ•œ ๋ฌธ์ž ๋ฐ์ดํ„ฐ์ฒ˜๋ฆฌ์˜ ๋ณต์žก์„ฑ ๋‹ค์–‘ํ•œ ์ธ์ฝ”๋”ฉ ๋ฌธ์ž์—ด ๊ธฐ๋Šฅ ๊ฐœ์„ 

 

์ข…ํ•ฉํ•˜์ž๋ฉด C/C++๊ณผ ๋น„๊ตํ–ˆ์„ ๋•Œ Java๋Š”

1. ๊ฐ„๊ฒฐํ•˜๋‹ค(๋งŽ์€ ๊ธฐ๋Šฅ ์ œ๊ฑฐ)

2. ์–ธ์–ด์— ์ปฌ๋ ‰์…˜์ด ํฌํ•จ๋˜์–ด ์žˆ๋‹ค

3. ์™„์ „ํ•œ ๊ฐ์ฒด์ง€ํ–ฅ์–ธ์–ด์ด๋‹ค

 

 

 

 

728x90

'Language > Java' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

[Java] Java ํ”Œ๋žซํผ์˜ ํŠน์ง•(Platform Independent) / WORA  (0) 2021.04.25