• Register

Recent posts tagged methods

20 2 3 min.
 The scanner class in java is used to obtain the input from users of different types like int, float, double, string, and much more. The next() and nextLine() methods are used to read the strings inputted by the user.The difference between them ...
posted Jun 4 Huzaifa-Glitch 875 points
27 0 3 min.
Hello reader, Welcome to my post :)In this post, we would be discussing the methods and their corresponding return types in java. Indeed, function and a method, both correspond to the same term in java. They both represent the entity. However, they m...
posted Jun 1 kesav.eee 188 points
17 2 2 min.
Both static and final are the keywords used to declare a variable in java. Both have a different effect when applied to class and methods. The main difference between them is that the static class member can be used independently while the final...
posted May 29 Huzaifa-Glitch 875 points
7 0 2 min.
In any programming language, there is always a starting point from where your program will start to execute. In Java Programming language, the main() method is the starting point. The main() method have a proper signature:Syntax:class Human{ public s...
posted May 27 Being human 148 points
6 2 2 min.
You can easily reverse a string by using a reverse method but what if we aren’t allowed to use the reverse method well there are several ways to reverse a string without using the reverse method and one of them is recursion. Recursion:In r...
posted May 23 Huzaifa-Glitch 875 points
0 0 2 min.
Overloading a MethodOverloading a method is a way of having multiple methods with the same name or identifier, and use them to perform different tasks. In order for you to overload a method, the parameters of the other methods do not need to have dif...
posted Apr 30 Tegra Balonga 500 points
0 0 3 min.
What are methodsA method is a program module containing codes or statements meant to accomplish a certain task. An example of a method is the main() method that is already created when you open a new java program and it is also the first method that ...
posted Apr 29 Tegra Balonga 500 points
0 0 2 min.
In this article, I am going to explain the different types of methods defined inside a method in java. This is pretty much simple but requires keen concentration to learn.ApproachCreate a class of your choice and you know that methods are basically d...
posted Nov 1, 2020 MallikaShaik672 500 points
0 0 5 min.
Here are 3 simple methods to remove a substring from a string in python.while working with Python Strings, we can have problem in which we need to remove a substring from String. This is quite easy and many times solved before. But sometimes, we deal...
posted Oct 23, 2020 jaseera 100 points
0 0 3 min.
In this article, we will see Can we override private methods in Java?Let us first consider the following Java program as a simple example of Exceed or Runtime Polymorphism.class Base {   public void fun () {      System.out.println ( "Base fun");   }...
posted Oct 13, 2020 Hasnain_khan 100 points
0 0 1 min.
In this blog, we will see how to exit a method in java so the best way is to use return keywords to get out of a method. return is the keyword that was reserved in Java eg, we can not use as an identifier. It is used to get out/exit from a metho...
posted Oct 11, 2020 Hasnain_khan 100 points
0 0 1 min.
****************************Java Scanner close () Method*********************Close () is the Java class method Scanner used to cover this scanner. This closes the underlying scanners and input when the input tool can be closed. If the scanner has bee...
posted Oct 10, 2020 Hasnain_khan 100 points
0 0 3 min.
In this article, we will discuss how  To use methods from another Java class . As long as your class has access to that other class, you can simply create an instance of that class and call the method.Do take note though that access le...
posted Oct 9, 2020 Hasnain_khan 100 points
0 0 2 min.
In this lesson, we will learn How to remove the last character from the string in PHP. PHP Has four methods to perform this functionality.Methods:substr_replace functionsubstr functionmb_substr functionrtrim functionsubstr_replace function:This funct...
posted May 14, 2020 Farkhanda Athar 3,890 points
To see more, click for the full list of questions or popular tags.