abstract class which is used for achieving partial abstraction. Unlike abstract class an interface is used for full abstraction. Abstraction is a process where you show only “relevant” data and “hide” unnecessary details of an object from the user Interface looks like a class but it is not a class. An interface can have methods …
Continue reading Interface in java with example programsJava
Collection Framework Need to collection If we need to store one value one variable is required 2 values two variables are required but if we need 10000 values to stored 10000 variables are required. To overcome this problem Arrays are available. Eg:- But there are limitations of arrays ie:- Arrays are fixed in size. …
Continue reading Collection in JavaAn enum is a special type of data type which is basically a collection (set) of constants. Internal Implementation of enum Enum declaration Use of Enum in Switch-Case Statements Here is the example to demonstrate the use of enums in switch-case statements. public enum Directions{ EAST, WEST, NORTH, SOUTH } public …
Continue reading Enum IntroductionJava.io.File Class in Java The File class is Java’s representation of a file or directory path name. Because file and directory names have different formats on different platforms, a simple string is not adequate to name them. The File class contains several methods for working with the path name, deleting and renaming files, creating new …
Continue reading File Handling in JavaAn array is a collection of similar data types. Array is a container object that hold values of homogeneous type. It is also known as static data structure because size of an array must be specified at the time of its declaration. Array starts from zero index and goes to n-1 where n is length …
Continue reading Java ArraysA Wrapper class is a class whose object wraps or contains primitive data types. When we create an object to a wrapper class, it contains a field and in this field, we can store primitive data types. In other words, we can wrap a primitive value into a wrapper class object. Need of Wrapper Classes …
Continue reading Wrapper Classes in JavaString Handling What is difference between String and StringBuffer String is immutable that object created for one string and on concatenating with that string it will not add with that string or it create new object with concatenation and StringBuffer is mutable that it appends with created string Strings in Java are Objects that are …
Continue reading String handling in javaOOPs concepts in Java Object-oriented programming System(OOPs) is a programming paradigm based on the concept of “objects” that contain data and methods. The primary purpose of object-oriented programming is to increase the flexibility and maintainability of programs. Object oriented programming brings together data and its behaviour(methods) in a single location(object) makes it easier to understand …
Continue reading Java OopsIf, If..else Statement in Java with Examples When we need to execute a set of statements based on a condition then we need to use control flow statements four types of control statements that you can use in java programs based on the requirement a) if statement b) nested if statement c) if-else statement d) …
Continue reading Conditional LoopIntroduction Java was developed by Sun Microsystems (which is now the subsidiary of Oracle) in the year 1995. James Gosling is known as the father of Java. Before Java, its name was Oak. Since Oak was already a registered company, so James Gosling and his team changed the Oak name to Java. History of Java …
Continue reading Java Overview