---
title: "Discussion on \"What are Java Records\" | Hashnode"
description: "Discussion on \"What are Java Records\". Java Record\nJava record is a type of class whose sole purpose is to drive programming with immutable data. Let’s look at a simple example.\npublic record Data( int x, int y)\n\nSo here we have created a record with header x and y. Here x and y are refer..."
url: "https://hashnode.com/posts/what-are-java-records/60b5ef10f4a8435c0ecc3a6b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What are Java Records](https://amrutprabhu.hashnode.dev/what-are-java-records?utm_source=hashnode&utm_medium=feed)

Java Record Java record is a type of class whose sole purpose is to drive programming with immutable data. Let’s look at a simple example. public record Data( int x, int y) So here we have created a record with header x and y. Here x and y are refer...

Jun 1, 2021 · 5 min read · amrutprabhu.hashnode.dev  
Read the article

-   [#java](https://hashnode.com/tag/java)

## Written by

[Amrut Prabhu](https://hashnode.com/@amrutprabhu)

@amrutprabhu

  
[View profile](https://hashnode.com/@amrutprabhu)

Software Craftsman | Tech Enthusiast

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
