Singleton Class and Private Constructor in Java : Free Java Tutorials

For any Java class, if we are allowed to create only one object, then such type of class is called a singleton class. For example, Runtime and ServiceLocator are singleton classes. We can implement a Singleton class using a private constructor. The advantage of Singleton class: Memory utilization and Performance improvement If several people have …

Singleton Class and Private Constructor in Java : Free Java Tutorials Read More »

Overloaded Constructors in Java : Free Java Tutorials

Overloaded constructors exist in Java. Within a class, we can declare multiple constructors. All these constructors are having the same name but different type of arguments. Hence, all these constructors are considered overloaded constructors. Hence, overloading concept is applicable to constructors. Example of Overloaded Constructors // Demo class class Demo { // defining three overloaded …

Overloaded Constructors in Java : Free Java Tutorials Read More »

URL configurations in the django view layer

In today’s high-quality web application a clean,elegant URL scheme is very important.With django we can design URLs as we want,with no framework limitations. We have to create a module called a URLconf (URL configuration) to design URLs for an app.This module URLconf  will contain pure python code and is a mapping between URL path expressions to views.This mapping …

URL configurations in the django view layer Read More »

More On Forms In Django and API In Forms

I hope you have read our earlier post on creating basic forms in django.In this post we will go in detail. More On Fields In Forms  Consider a below ContactForm class which we can be used to implement “contact me” functionality on a any personal website. from django import forms class ContactForm(forms.Form): subject = forms.CharField(max_length=100) …

More On Forms In Django and API In Forms Read More »