How do you create methods that does not return a value?

1 answer

Answer

1121838

2026-04-24 05:45

+ Follow

Java
Java

That depends on the programming language. In C, and languages derived from C (including Java), you usually declare the return value as "void", for example:

void MyMethod(int par1, int par2) {

// Some commands here

}

ReportLike(0ShareFavorite

Copyright © 2026 eLLeNow.com All Rights Reserved.