Skip to main content

About function overloading

Function overloading is a feature in c++.
Probably Java also has this feature

c++ allows you to specify more than one function with same function names.
And that's called function overloading.

One thing to aware, all the functions overloaded should have same return data type.
The thing can differ is the arguments on the function.

The following example was wrote during the game programming class.



Note that the return data type is same on all functions overloaded.

Popular posts from this blog

About bitwise and bit shift operands

We are getting to know about Java's basics. Java has the bitwise operators. (which all other advanced programming language do either) There are several operands of them. Bitwise operators & opreator Performs an and calculation between data bits ^ opreator Performs an or calculation between data bits | opreator Performs a xor calculation between data bits ~ operator Inverts all data bits Bitshift operators << operator Shifts the bit pattern to the left >> operator Shifts the bit pattern to the right >>> operator Shifts the zero to the leftmost position These are the opreators. which is never used. Even the Java Documentation says these are "less commonly used". So just make sure you 'heard' of these exists. Check out more about these operators here: Official Java Documentation

About string operands

Well known data type String is also available on Java. There are a lot of easy-to-use features on using String data type. But its little bit complicated on actually using them. Let me explain by some actual examples. As you see on the 4th line, if you put the calculating expression in front of the string (which is covered in quotes) and it will automatically return the calculated value of the expression and merge those two strings. The opposite seems to show the same output, but it doesn't. See the 5th line and you will see. The following expression 3 + 4 isn't calculated. Didn't know dem Its always good to know new things ;)

Presentation about Heap Sorting

This was a presentation for Sunrin High school Programming class. View the original zip file on Google Drive (Contains the sorting visualization tool and the C code) Thanks