Java Final Keyword | final keyword | Java example

Java Final keyword is used to define a constant variables, methods and classes.We can also consider them to be constants they cannot be modified later once declared and assigned a value.   java final variable : Difference between normal variable and java final variable can be seen through this example. Consider a String and assign … Read more

Java Enumerations || Enum || Java example

Java Enumerations : When ever you need to use a constants in program we need to implement them using enum. Java Enumerations is a special class which contains the constant declarations we require in various scenarios. For example when we want to know the result of a student in examination we require few constants like … Read more

Switch Case || Java example

Java switch case When we have multiple options and based on condition we need to choose one then we can use switch condition. For example when we have 4 options and based on user input we need print a message this is the best scenario to use java switch case condition. We might also use … Read more

Access Modifiers || Java example

  Java access modifiers : In java we have Access Modifiers to provide access to methods, class, variables.We can alter the accessibility of the variables, methods and classes using these modifiers. The access modifiers in java are Default Public Private Protected   Default : When you don’t specify any access modifier by default it will … Read more

Show Buttons
Hide Buttons