Posts

Showing posts with the label Java

Java Object-Oriented Programming

Image
 Java Object-Oriented Concept Currently, Java is one of the most popular object-oriented programming languages used by software developers. Accordingly, we make a qualitative inquiry about the object-oriented concept of Java. Why do we need object-oriented programming? In the past, length coding was done between single files. Accordingly, codes with a large number of rows are seen. Thus, it was a difficult task to identify the errors due to the large number of lines printed while coding. Also, it was not an easy task. Accordingly, the maintenance cost was greater than the initial cast.   Due to these problems, later as a solution to these, it was decided to divide the code into small parts and take those parts separately as individual parts to carry out the coding process. in this way, the separately processed parts are connected to the main. Thus, the subsequent changes could be whitened easily. Among the benefits of this, the grant benefit is the ability to reuse codes....

Java Return Type

Image
 The return type in java refers to the data type of the value that a method returns. We can divide two types of return types and nonreturn types. the type of return requirements depends on the scenario. The case where no return is expected. If no return is expected from the method should be written as a void before the method name. it informs that no return is expected. (0.1) thus, since the main method has also been used to write the void, it is felt that no return is expected from the main method. (0.2) The case where the return is expected Here it is essential to specify the data type before the method name instead of void. here, the data type to be returned is determined according to the date type provided. that is, when specified as int, double, char, or String the return is always the same as that data type. int (0.3) double (0.4)