---
id: java-data-types-real-life
title: "Java Data Types Real Life"
category: "Programming_Language"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["자바 자료형 실전 예제"]
duplicate_of: ""
source_trust_level: "B"
confidence_score: 0.86
created_at: 2026-07-04
updated_at: 2026-07-04
review_reason: ""
merge_history: []
tags: ["java", "programming", "w3schools", "datatypes", "real-life"]
raw_sources: ["https://www.w3schools.com/java/java_data_types_reallife.asp"]
applied_in: []
github_commit: ""
---

# [[Java Data Types Real Life]]

## 🎯 한 줄 통찰 (One-line insight)
A realistic calculation mixes int, float, and char in one program — multiplying an int by a float promotes the result to float automatically, then concatenating a char currency symbol shows how types blend when building output strings. [S1]

## 🧠 핵심 개념 (Core concepts)
- **Mixed-type calculation** — `float totalCost = items * costPerItem;` combines `int` and `float` operands; the result is `float`. [S1]
- **char in string concatenation** — `costPerItem + currency` appends the char symbol to the printed line. [S1]

## 📖 세부 내용 (Details)
- Full example: `int items = 50; float costPerItem = 9.99f; float totalCost = items * costPerItem; char currency = '$'; System.out.println("Total cost = " + totalCost + currency);`. [S1]

## ⚖️ 모순 및 업데이트 (Contradictions & updates)
소스에서 모순되는 정보는 발견되지 않음.

## 🛠️ 적용 사례 (Applied in summary)
현재 발견된 실제 적용 사례가 없습니다 — 여러 자료형을 조합한 총액 계산은 실무에서 흔한 패턴이다. [S1]

## 💻 코드 패턴 (Code patterns)
Mixed int/float calculation with char output (Java):
```java
int items = 50;
float costPerItem = 9.99f;
float totalCost = items * costPerItem;
char currency = '$';
System.out.println("Total cost = " + totalCost + currency);
```

## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.86
- **중복 검사 결과:** 신규 생성 (New discovery)

## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[Java Tutorial]]
- **관련 개념:** [[Java Data Types]], [[Java Numbers]], [[Java Characters]]
- **참조 맥락:** int/float/char를 조합한 실전 계산 예제.

## 📚 출처 (Sources)
- [S1] W3Schools — Java Data Types Example — https://www.w3schools.com/java/java_data_types_reallife.asp

## 📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "Java Data Types Example" page (Astra wiki-curation, P-Reinforce v3.1 format).
