This post shows Ruby codes that create a simple class and objects from that class. Yes, Ruby is an old and weird programming language, but people and companies are still using it. Therefore, no one programming language has a monopoly
Java – Where can we place the public static void main method?
Many Java programmers are only familiar with having the public static void main in a class to start the application. However, there are other places where we can define this static method and still start up a Java application. This
Type Checking in JavaScript
Okay, JavaScript is a loosely-typed language, which means you do not declare the data type of a variable explicitly. In a basic variable assignment expression, e.g., var i = 4;, the value that assigns to the variable determines the data type of the variable. As you assign different types of data to the same variable, its data type changes as well. Given the nature of JavaScript, finding out what data type a variable represents before using it is very important.
JavaScript Object Creation and Object Methods and Properties
[wp_ad_camp_1] If you’ve read this, it merely declares JavaScript can do OOP. It did not talked about other (more advanced) OOP stuff like access modifiers, encapsulation – behaviors and properties, and inheritance. On this article, we’ll talk more on object
Return class’ Canonical Name in PHP
Background [wp_ad_camp_1] There are times you need to refer to a class by a string representing its fully qualified class name. For example in Laravel 4.2, you may specify a route to a controller by hard-coding the fully qualified class