Samual Sam has Published 2310 Articles

Display the minimum of three integer values in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:07:43

407 Views

The following is an example displaying the minimum of three integer values.Example Live Demopublic class Demo {    public static void main(String[] args) {       int val1 = 99;       int val2 = 87;       int val3 = 130;       System.out.println("Number 1 = ... Read More

Default value of primitive data types in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:06:32

18K+ Views

Primitive datatypes are predefined by the language and named by a keyword in Java. Here is an example to display the default value of primitive data types.Example Live Demopublic class Demo {    static boolean val1;    static double val2;    static float val3;    static int val4;    static long ... Read More

Overflow of DataTypes in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:05:01

1K+ Views

Overflow occurs when the given value is more than the maximum prescribed size of a data type. The overflow condition can result to an error or now the implementation of the programming language handles it on its own.To display overflow of datatypes, I have taken an example of float datatype. ... Read More

Parse a string to a Boolean object in Java

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:04:00

258 Views

The valueOf() method returns the relevant Number Object holding the value of the argument passed. The argument can be a primitive data type, String, Boolean, etc. Therefore, to parse a string to a Boolean object, use the Java valueOf() method.The following is an example showing how to parse a string ... Read More

Java Program to compare two Boolean Arrays

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:03:06

238 Views

Use Arrays.equals() method to compare two Boolean Arrays. Let us first create some arrays to be compared. For using this method, you need to import the following package −import java.util.Arrays;We have 4 arrays and value “true” and “false” are assigned to them.boolean[] myArr1 = new boolean[] { true, false, true, ... Read More

zip_entry_filesize() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 10:01:55

93 Views

The zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.Syntaxzip_entry_filesize(zip_entry)Parameterszip_entry − A zip file opened with zip_open() is to be mentioned here.ReturnThe zip_entry_filesize() function returns the file size before compression i.e. the actual file size is returned.ExampleRead More

How can I get enum possible values in a MySQL database using PHP?

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:59:16

2K+ Views

You can get the enum possible values in a MySQL database with the help of INFORMATION_SCHEMA.COLUMNS table. The syntax is as follows −SELECT    COLUMN_TYPE AS anyAliasName FROM    INFORMATION_SCHEMA.COLUMNS WHERE    TABLE_SCHEMA = ‘yourDatabaseName’ AND TABLE_NAME = 'yourTableName' AND COLUMN_NAME = 'yourEnumColumnName';To understand the above syntax, let us create ... Read More

zip_entry_open() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:57:24

79 Views

The zip_entry_open() function is used to open a zip archive entry for reading.Syntaxzip_entry_open(zip_file, zip_entry, mode)Parameterszip_file − The zip file to be readzip_entry − The zip entry to open.mode − The type of access needed for zip archiveReturnThe zip_entry_open() function Returns TRUE on success, or FALSE on failure.ExampleRead More

zip_open() function in PHP

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:56:31

79 Views

The zip_open() function opens a zip file for reading. It returns an open zip file on success and FALSE on failure.Syntaxzip_open(zip_file)Parameterszip_file − The path of the file to be opened.ReturnThe zip_open() function returns an open zip file on success and FALSE on failure.ExampleOutputCompressed: 90 Compressed: 12 Compressed: 67Read More

How do I lag columns in MySQL?

Samual Sam

Samual Sam

Updated on 26-Jun-2020 09:55:30

223 Views

To lag a column in MySQL, first, let us create a table. The query to create a table is as follows −mysql> create table LagDemo    -> (    -> UserId int,    -> UserValue int    -> ); Query OK, 0 rows affected (1.74 sec)ExampleInsert some records in the ... Read More

Advertisements