Sithila Sihan SomaratneJava — EncapsutationNote: I am so sorry! It happened again. It nearly passed a month since I didn’t touch Medium…. so, I didn’t write any blogs since then…11h ago11h ago
Sithila Sihan SomaratneJava — ModifiersBy now, you are quite familiar with the public keyword that appears in almost all of our examples:Sep 19Sep 19
Sithila Sihan SomaratneJava — ConstructorsA constructor in Java is a special method that is used to initialize objects. The constructor is called when an object of a class is…Sep 13Sep 13
Sithila Sihan SomaratneJava — Class MethodsYou learned from the Java Methods blog that methods are declared within a class, and that they are used to perform certain actions:Sep 11Sep 11
Sithila Sihan SomaratneJava — Class AttributesIn the previous blog, we used the term “variable” for x in the example (as shown below). It is actually an attribute of the class. Or you…Sep 10Sep 10
Sithila Sihan SomaratneJava — Classes/ObjectsJava is an object-oriented programming language.Sep 9Sep 9
Sithila Sihan SomaratneJava — MethodsA method is a block of code which only runs when it is called.Sep 6Sep 6
Sithila Sihan SomaratneJava — ArraysArrays are used to store multiple values in a single variable, instead of declaring separate variables for each value.Sep 5Sep 5
Sithila Sihan SomaratneJava — Break and ContinueYou have see the break keyword in the switch statement, in a previous blog. It was used to “jump out” the statement.Sep 1Sep 1