---
title: "Discussion on \"Var - Args\" | Hashnode"
description: "Discussion on \"Var - Args\". To understand the var args concept , let us solve the following problem\n\nWrite a class that has a method called sum( ) which can add and return the sum of all the integers passed to it as argument .\n\nThe method should be able to accept 2 3 or 4 argum..."
url: "https://hashnode.com/posts/var-args/6939c70e2803769f4adde389"
---

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

Discussion

# [Var - Args](https://javaforinterview.hashnode.dev/var-args?utm_source=hashnode&utm_medium=feed)

To understand the var args concept , let us solve the following problem Write a class that has a method called sum( ) which can add and return the sum of all the integers passed to it as argument . The method should be able to accept 2 3 or 4 argum...

Dec 10, 2025 · 4 min read · javaforinterview.hashnode.dev  
Read the article

-   [#java8](https://hashnode.com/tag/java8)
-   [#java](https://hashnode.com/tag/java)
-   [#javaforbeginners](https://hashnode.com/tag/javaforbeginners)
-   [#interview](https://hashnode.com/tag/interview)
-   [#interview-questions](https://hashnode.com/tag/interview-questions)

## Written by

[Rayees Ali](https://hashnode.com/@ali1510)

@ali1510 · Bhopal, India

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

Aspiring Java web dev

I am Aspiring full stack java Developer .

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
