Tag: We
what’s placement new operator and why do we need it.
In this article we will discuss what is placement new operator and what’s its need. Need of placement new operator Every when we create a new object using new operator, memory is allocated on heap i.e. Advertisements int * ptr = new int; But there might be scenarios when we want to dynamically create an …
what’s placement new operator and why do we need it.Read More
Java Constructor Tutorial – Why do we need Constructors ?
In this article we will discuss need and usage details of constructors in Java. What is a Constructor ? Constructor is a member function of the class that is used to initialize a newly constructed object i.e. initializing the member variables of object. Advertisements It has the same name as of the class. Why do …
Java Constructor Tutorial – Why do we need Constructors ?Read More
Why should we prevent Method Overriding in Java
In the previous article we discussed, how to prevent method overriding in Java. In this article we will discuss what’s the need of Preventing method overriding in Java. Need of preventing Method Overriding in Java We generally prevent method overriding in Base class because of two reasons i.e. Advertisements Design Decision Performance Lets discuss both …
Why do we need Lambda functions in Python ? | Explained with examples.
In this article we will discuss what is a lambda function in python and why they are required. Basically what are the use cases which makes use of lambda function must. What is a lambda function ? Lambda functions are also called Anonymous functions because they don’t have any name. Also they can be assigned …
Why do we need Lambda functions in Python ? | Explained with examples.Read More
What is a dictionary in python and why do we need it?
In this article, we will discuss dictionaries in python and will try to answer questions like, What is a dictionary? Why do we need it? How to create a dictionary? How to access elements in a dictionary? What is a dictionary in python? In python, a dictionary is a kind of container that stores the …
What is a dictionary in python and why do we need it?Read More
What is a List in Python and why we need it?
This article will answer questions like what a list is in Python and why we need a list data structure in Python. What is a List? The list is a sequential data structure in Python. It can contain a group of elements, which can be of the same or different data types. A basic example …