4. Methods
इस लेख का अनुवाद अपने आप होगा। अभी अंग्रेज़ी में दिखाया जा रहा है।
A method is a named block of code inside a class. Declare the return type, the name and the parameter types. static methods can be called without creating an object.
उदाहरण देखें
static int twice(int x) {
return x * 2;
}