Friday , December 13 2019

Monthly Archives: October 2015

JAVA #24 – Abstract Classes in Java

Abstract Classes An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed. abstract class GraphicObject { int x, y; ... void moveTo(int newX, int newY) { ... } void draw() { . . …

Read More »

9 Amazing Stuffs About 3D Touch

  Hands-up,The  one of coolest features of the new iPhone 6s and 6s plus is 3D Touch, that Charming touch Structure that lets you quickly access common tasks fast as rocket. Here are the some so far. Camera: The selfie-inclined are going to love it especially, but it is handy for specific types of …

Read More »

JAVA #23 – Nested Classes and Static Keyword in Java

Nested Classes in Java The Java programming language allows you to define a class within another class. Such a class is called a nested class Nested classes are divided into two categories: static and non-static. Nested classes that are declared static are called static nested classes. Non-static nested classes are called inner classes. Syntax: public …

Read More »

JAVA #22 – Method Overriding in Java

Method-Overriding in Java An instance method in a subclass with the same signature (name, plus the number and the type of its parameters) and return type as an instance method in the superclassoverrides the superclass’s method. Syntax public class animal{// Super class …. } public class mammals extend animal{ //child class …

Read More »

JAVA #21 – Constructor Overloading in Java

Constructor-Overloading in Java In some programming languages, constructor overloading is the ability to create multiple methods of the same name with different implementations in same class. Syntax public class DataArtist { ... DataArtist (String s) { ... } DataArtist (int i) { ... } DataArtist (double f) { ... } …

Read More »

JAVA #20 – Method Overloading in Java

Methodoverloading in Java In some programming languages, function overloading or method overloading is the ability to create multiple methods of the same name with different implementations in same class. Syntax public class DataArtist { ... public void draw(String s) { ... } public void draw(int i) { ... } public …

Read More »

JAVA #19 – Access Modifiers and More on Classes

Controlling Access to Members of a Class Access level modifiers determine whether other classes can use a particular field or invoke a particular method. There are two levels of access control: At the top level—public, or package-private (no explicit modifier). At the member level—public, private, protected, or package-private (no explicit modifier). A class may be declared …

Read More »