CodeSteps

Python, C, C++, C#, PowerShell, Android, Visual C++, Java ...

Java – Lambda Expressions

Lambda expressions in Java deal with functional programming. It is an introduction to functional programming in Java. Lambda expressions were introduced in Java 8 version. They were introduced to provide implementations to functional interfaces and also provide a simpler way of working with functional interfaces. What is a Functional Interface? An interface is termed to […]

Java – How to impose constraints on Generics in Java?

In our previous article, we discussed generics in Java. There are a few constraints that we can impose while working with Generics using extends and super keywords. The ‘extends’ keyword with respect to class Let’s create the Demo<T> class using extends keyword. class Demo<T extends Number> {        T value; } This implies that the class […]

Ruby Programming – Getter and Setter methods

Ruby allows defining class and instance variables. Ruby doesn’t allow us to access the variables of the class directly; instead, we can use methods to access or modify the variables of the class. We have discussed an overview of classes in Ruby through my previous Article “Ruby Programming – An Overview on Classes“. Through this […]

Java – How to use Generics in Java?

Java is a type-safe language. In the sense, in Java, it is required to specify the data type of the variable or the method argument while declaring it. For instance, see the examples below: int var = 5;   //  type of the variable is int void show(String arg){}   // type of the argument arg is […]

MFC – The device context classes

Windows device context is the key GDI element that refers a physical device. Device contexts are used to draw to the physical device; screen, printer, etc,. MFC provides different wrapper classes; and each class is associated with Windows device context. Through this article, we are going to discuss different MFC’s Device Context classes. CDC class […]

Ruby Programming – An Overview on Classes

As we discussed in our previous Articles, Ruby is a pure object-oriented language. That means, everything is an object of a class in Ruby. Non-object things are NOT exists in Ruby. Unlike C++ where you can write the program without classes or objects; in Ruby we CAN NOT write programs without classes or objects. Hence […]

Scroll to top