Chandu yadav has Published 1163 Articles

Writing a CSV file in Java using OpenCSV

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 14:11:46

632 Views

In Java there is no delegate library or API in order to write or read comma separated value(csv) file.So a 3rd party APIs are available for such requirements.Most popular 3rd party API is OpenCSV which is provide methods to deal with CSV file such as read csv file, write csv ... Read More

Compare two double arrays in a single line in Java

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 14:08:45

132 Views

Two double arrays can be compared in Java using the java.util.Arrays.equals() method. This method returns true if the arrays are equal and false otherwise. The two arrays are equal if they contain the same number of elements in the same order.A program that compares two double arrays using the Arrays.equals() ... Read More

Passing and Returning Objects in Java

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 14:08:38

4K+ Views

As we know it is core concept that in Java there is always pass by value and not by pass by reference.So in this post we will focus on that how this concept get validated in case of passing primitive and passing reference to a method.In case when a primitive ... Read More

Usage of hsla() CSS function

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 14:07:42

148 Views

To define colors using the Hue-Saturation-Lightness model (HSL), use the hsla() CSS method.You can try to run the following code to implement the hsla() function in CSSExampleLive Demo                    h1 {             background-color:hsl(0,100%,50%);          }          h2 {             background-color:hsl(192,89%,48%);          }          p {             background-color:hsla(290,100%,50%,0.3);          }                     Red Background       Blue Background       This is demo text!    

Display the package name of a class in Java

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 14:05:00

5K+ Views

The package for a class can be obtained using the java.lang.Class.getPackage() method with the help of the class loader of the class. If there is no package object created by the class loader of the class, then null is returned.A program that demonstrates this is given as follows −Example Live Demoimport ... Read More

What would getPackage() return for a primitive or array in unnamed package in Java?

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 14:01:22

95 Views

The package for a class can be obtained using the java.lang.Class.getPackage() method with the help of the class loader of the class.The getPackage() method returns null for a primitive or array in unnamed package. A program that demonstrates this is given as follows −Example Live Demopublic class Main {    public ... Read More

Insert NULL value into INT column in MySQL?

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:55:09

20K+ Views

You can insert NULL value into an int column with a condition i.e. the column must not have NOT NULL constraints. The syntax is as follows.INSERT INTO yourTableName(yourColumnName) values(NULL);To understand the above syntax, let us first create a table. The query to create a table is as follows.mysql> create table ... Read More

Python Context Manager Types

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:51:46

245 Views

In python, the runtime context is supported by the with statement. The context is defined by the context manager. Using the context manager, we can create user defined classes to define the runtime context. It enters into the task before executing the statement body, and when the statement body is ... Read More

Listing the Modifiers of a Class Object in Java

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:50:34

153 Views

The modifiers for a class or an interface are returned by the java.lang.Class.getModifiers() method. These modifiers are encoded as an integer and they consist of the JVM’s constants for public, private, protected, final, abstract, static and interface.A program that demonstrates this is given as follows −Example Live Demoimport java.lang.reflect.Modifier; public class ... Read More

String Operations in Python

Chandu yadav

Chandu yadav

Updated on 25-Jun-2020 13:48:21

617 Views

In python, there is a standard library, called string. In the string module, there are different string related constants, methods, classes are available.To use these modules, we need to import the string module in our code.import stringSome string constants and their corresponding values are as follows −Sr.No.String Constant & Values ... Read More

Advertisements