IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesJava  Print This     

Base Class (Java and Delphi Cross Reference Guide)

By Mike Prestwood

Java versus Delphi: A side by side comparison between Java and Delphi.

 
OOP Basics
 

Some languages support object-based concepts such as Paradox, Access, and VB Classic. Other languages have OO extensions and fully support object orientation in a hybrid fashion (such as C++ and Dephi for Win32). Finally, some lanages such as C#, VB.Net, Prism, and Java are entirely written in OO. Meaning, every line of code written must occur within a class).

Base Class

[Other Languages] 

Languages Focus

When you create a class, it is either a base class or inherits from another class. Some languages require all classes to inherit from a common base class and some do not.

Java:   Object

The Object class is Java's single base class all classes ultimately inherit from.

Syntax Example:
public class Cyborg {
}

or you can specify the base class (or any other class):

public class Cyborg extends Object {
}
Delphi:   TObject

In Delphi programming language (Object Pascal), all classes ultimately inherit from the base class TObject.

Syntax Example:
//Specify both namespace and class:
TCyborg = class(System.TObject)
end;
  
//Use shortcut alias:
TCyborg = class(TObject)
end;
  
//None, default is System.TObject
TCyborg = class
end;












Sales Website: www.prestwood.com Or visit our legacy sales site: 
legacy.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]