Skip to content

Javaのサンプルコードの型名を修正しました。#1095

Merged
suin merged 1 commit intomasterfrom
1094
Feb 28, 2026
Merged

Javaのサンプルコードの型名を修正しました。#1095
suin merged 1 commit intomasterfrom
1094

Conversation

@suin
Copy link
Copy Markdown
Contributor

@suin suin commented Feb 28, 2026

対象者

  • 📖 読者

Problem

「変数宣言の型注釈」ページのJavaサンプルコードで、プリミティブ型が Int(大文字始まり)と記述されていました。Javaに Int 型は存在しないため、Java経験者にとって違和感のあるコード例になっていました。

Solution

Int を正しいプリミティブ型 int(小文字)に修正しました。

- Int num = 123; // Java
+ int num = 123; // Java

Value

読者がJavaとTypeScriptの型注釈の違いを正確に理解できるようになります。


Close #1094


Note

Low Risk
Low risk documentation-only change that corrects an example snippet and does not affect code or runtime behavior.

Overview
Corrects the Java sample code in docs/reference/values-types-variables/type-annotation.md by changing the invalid Int primitive type to the correct int, improving accuracy for readers comparing Java vs TypeScript type annotations.

Written by Cursor Bugbot for commit adfd0c9. This will update automatically on new commits. Configure here.

## 対象者

- [x] 📖 読者

## Problem

「変数宣言の型注釈」ページのJavaサンプルコードで、プリミティブ型が `Int`(大文字始まり)と記述されていました。Javaに `Int` 型は存在しないため、Java経験者にとって違和感のあるコード例になっていました。

## Solution

`Int` を正しいプリミティブ型 `int`(小文字)に修正しました。

## Value

読者がJavaとTypeScriptの型注釈の違いを正確に理解できるようになります。

---

Close #1094

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
book Building Building Preview, Comment Feb 28, 2026 9:22am

Request Review

@suin suin merged commit 33b352b into master Feb 28, 2026
7 checks passed
@suin suin deleted the 1094 branch February 28, 2026 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Javaのサンプルコードの間違いについて

1 participant