Latest :

Author Archives: Writer - MK

Java: Number of Days In A Month – 3 Ways | Java Programs

Java Program To Calculate Number of Days In A Month – In this article, we will detail in on how to calculate the number of days in a month in Java Programming. Suitable examples and sample programs have been included in order to make you understand simply. The compiler has also been added so that you can execute the programs ...

Read More »

Oops Concepts In Java – Tutorial With Examples | Oops

Oops Concepts in Java complete tutorial & Types with sample examples & Programs. Also check the complete Java tutorials right here. There are different paradigms followed in writing programs (developing software) like the following… Sequential Programming. Procedure Oriented Programming. Object-Oriented Programming. Multi-tier Programming, etc To develop better software, programmers and managers concentrate on the aspects like the following. These people ...

Read More »

Parameterized Constructor In Java – Tutorial & Examples

What is Parameterized Constructor in Java – Tutorial & Examples – If we want to set some data to the constructor so that it can be used in the constructor then we can send so like Person r=new Person(10,20); to receive the values, the corresponding constructor should have formal arguments like. [crayon-65181483de075991921631/] If we want to send three values to constructor ...

Read More »

IRCTC API & Source Codes – Indian Railways API

IRCTC or the Indian Railways Catering and Tourism Corporation is the major online ticketing web portal which is primarily handled by the Indian Railways itself. It is the only official online portal to book train tickets online. The web portal is heavily encrypted. So, you need to create a profile in order to access the website completely and book tickets for ...

Read More »

Generic Class With Multiple Type Parameters In Java

How the generics work with multiple types: “Generics” mechanism allows us to work with a class (or method) that suits for any type of data. Suppose we want one Stack that holds Integer data and another Stack that holds String data then we need two different classes. With generics, we can write only one class that works for both the ...

Read More »

Java Simple Generic Class – Tutorial & Programs

Generics is the mechanism of creating a class or method that works for any type of data. Here we covered the complete tutorial along with suitable examples and sample programs, Examples. Note: Generics work with objects (Integer, Double, String, etc) only. They cannot be used with primitive type data (int, double, etc). [crayon-65181483e14b4798792268/] Output: [crayon-65181483e14b9903163941/] In the above example, class ...

Read More »

Multithreading In Java – Tutorial & Examples | JavaTutorials

Multithreading in Java,  is the mechanism of executing different parts of a program simultaneously. Suppose, in a normal program, we are in one method and calling another method then the control goes to the called method, executes the statements in that method and comes back to calling the method. As long as the control executes the method, the statements after ...

Read More »

Java Exception Throw Clause – Tutorial & Examples

Java exception Throw Clause – “throw” clause is used to throw an exception from our side. Normally, the system throws an exception when a runtime error occurs. Generally “throw” is used in two situations When we want to throw a new exception object (that is created by us) When we want to pass an exception object from one place to ...

Read More »

Java Constructor Chaining – Types & Example | Tutorials

Java Constructor Chaining – Calling one constructor from another constructor is generally referred to as constructor chaining. This can be achieved in two ways. this() super() in some cases we use only this(), in some other cases, we use only super(). Sometimes we use both (but not directly). Normal Java constructor calling (without chaining) When we create an object, its ...

Read More »

Java Convert Double To Long – Examples

Java convert double to Long – We have different ways to convert a double value to a long value or from long to double. Apart from the given program, you can check out the list of over 500+ Java programs with sample examples and outputs. Methods we used to convert double to long/ long to double: Simple type conversion round() ...

Read More »