In my opinion, there is only a syntax difference between parameterized constructors and setter function in JAVA. Both would be used to initialize the class variables with user-defined values. In parameterized constructors, all the class variables can be initialized within one function (constructor) which is automatically invoked when a user creates an object of thatRead More
variables
File Handling || Traverse folders and subfolders in Java.
As we all know that we can read or write data on any format of file whether it is excel, word, notepad. But sometimes we need to traverse folders and subfolders to locate any file. Also, sometimes we need to identify the file folder count under specific directory, find a file with specific name, findRead More
Basic Java – 13 || Decimal values v/s Octal base(8) values in JAVA.
Any numeric value which fulfills below conditions would be treated as octal base(8) values: Should have three or more digits Should start with 0 Octal base number system The octal number system is like a binary number system having the base of 8. It works on 0-7 digits values. Example of Octal numbers, 010, 011,Read More
Basic Java – 12 || Alternate looping concepts while and do-while. (Loops Part-2)
While and do-while are two more alternates of for loop in Java. The only representation of these statements is different. while Loop While loop consists only one parameter, based on that it repeats the instructions given in while block. A while loopRead More
Basic Java – 11 || for and for-each in Java. (Loops Part-1)
Sometimes we need to perform a set of instruction(s) repeatedly. We have to use for and for-each statements in Java Programming. Instructions within a loop statement repeat itself until a predefined condition. For Loop Along with the key feature of, repeating a set of instruction(s)Read More
Basic Java – 10 || Conditions (If and Switch) in JAVA.
To create a robust and error-free program we need to perform an action based on the certain conditions. In Java, this can be achieved using If and Switch statements. These statements are called conditional statements in JAVA. If-else Statement Let’s understand first If statement. An ifRead More
Basic Java – 9 || Performing multiple operations using Java Operators.
Java Operators used to perform data manipulation while programming. Although there are multiple Class and Methods present in the Java library to perform such operations. We have some java operators which are used to perform basic calculation and operations. Operation Types Arithmetic Operations: To perform the basic calculation on numericRead More
Basic Java – 8 || Lets learn about Arrays in Java.
In general, “array” means an arrangement of similar things in a particular way. On the other hand, we can say the arrays in Java is grouping the things having same features. In Java programming, the array is used to store multiple values in aRead More
Basic Java – 7 || Static Variables and Methods.
The synonyms of static, is unchangeable or fixed, means value doesn’t get change from external behaviors. In Java, static variables and methods can be called directly using the class name without creating any object. In other words, the static keyword used to define a method orRead More
Basic Java – 2 || Variables and Data Types used in JAVA.
As the name sounds “Vary+able”, means the value can be changed. Basically, the variable is the name of the memory location which is used to store and retrieve the value in it. Related Links: OOPs Concept: Java Question And Answer: Definition and Types of Variable Read More