Tutor profile: Klevis X.
Subject: Java Programming
What are constructors in Java ?
A constructor in Java refers to a block of code that is used to initialize an object. It must have the same name as that of the class. Also, it has no return time and it is automatically called when an object is created. There are two types of constructors in Java : 1. Default Constructor - a default constructor is the one which does not take any inputs. In other words, default constructors are the no argument constructors which will be created by default in case no other constructor is defined by the user. 2. Parameterized Constructor - a parametrized constructor in Java, is the constructor which is capable of initializing the instance variables with the provided values by the user. In other words the constructors that take arguments are called parameterized constructors.
What is the key difference between relational and non-relational databases ?
The key difference is that a relational database stores data in a tabular form, while a non-relational database stores data as files. A relational database like MYSQL represent and store data in tables and rows. Meanwhile, a non-relational database like MongoDB represent data in collections of JSON documents.
needs and Klevis will reply soon.