What are parameters in java?

Java

1 answer

Answer

1057361

2026-05-03 03:20

+ Follow

A parameter or an argument is a value that is passed to a method so that the method can use that value in its processing.

Ex:

public String getName(String x){

return "Mr. " + x;

}

Here the method just prefixe's a Mr. with the value that is being passed to the method getName. The value X can be termed a parameter or an argument

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.