Let’s make a Calculator

Great! Now let's do some math and get our hands dirty. In python, Maths operations are very simple to perform. You can add, subtract, multiply, divide and even do exponentiation. TRY IT...

Using Objects as Parameters

So far, we have only been using simple types as parameters to methods. However, it is both correct and common to pass objects to methods. For example, consider the following short...

Argument Passing

In general, there are two ways that a computer language can pass an argument to a subroutine. The first way is call-by-value. This approach copies the value of an argument into...

Overloading Constructors

In addition to overloading normal methods, you can also overload constructor ,methods. In fact, for most real – world classes that you create, overloaded constructors will be the norm, not the...

Overloading Methods In Java

In Java it is possible to define two or more methods within the same class that share the same name, as long as their parameter declarations are different. When this is...

Writing Your First Python Program

Well, you have gone through a lot of theory to get you started with your first program. So let’s get your hands dirty. Go to the command prompt if you are on...

How to Install Python on Your System?

Windows Platform Directly go on this link: https://www.python.org/downloads/ and click on the version you wish to install. Run the .exe file and you are good to go. However there are also several different...

Java Enumerations

Version prior to JDK 5 lacked one feature that many programmers felt was needed: enumeration. In its simplest form, an enumeration is a list of named constants. Although Java offered other features...

Constructors

A constructor is a member method of a class that is called for initializing when an object is created of that class. It has the same name as that of the...

Methods in Java

A program is a set of instructions given to a computer. These instructions initiate some action and hence sometimes called executable instructions. In Java programs, the executable instructions are specified through...