Samual Sam has Published 2492 Articles

How to apply if tag in JSP?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

194 Views

The tag evaluates an expression and displays its body content only if the expression evaluates to true.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaulttestCondition to evaluateYesNonevarName of the variable to store the condition's resultNoNonescopeScope of the variable to store the condition's resultNopageExample ... Read More

LocalDate now() Method in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

192 Views

The current date can be obtained from the system clock in the default time zone using the now() method in the LocalDate class in Java. This method requires no parameters and it returns the current date from the system clock in the default time zoneA program that demonstrates this is ... Read More

C++ Program to Check Whether an Input Binary Tree is the Sub Tree of the Binary Tree

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

165 Views

A binary tree is a tree data structure in which each node has at most two children, which are defined as left child and right child.AlgorithmBegin    function identical():        Take two nodes r1 and r2 as parameter.       If r1 and r2 is NULL then ... Read More

How to generate a random BigInteger value in Java?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

2K+ Views

To generate random BigInteger in Java, let us first set a min and max value −BigInteger maxLimit = new BigInteger("5000000000000"); BigInteger minLimit = new BigInteger("25000000000");Now, subtract the min and max −BigInteger bigInteger = maxLimit.subtract(minLimit); Declare a Random object and find the length of the maxLimit: Random randNum = new Random(); ... Read More

What is Java Server Pages, JSP? Why JSP is preferred over CGI?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

977 Views

JavaServer Pages (JSP) is a technology for developing Webpages that support dynamic content. This helps developers insert java code in HTML pages by making use of special JSP tags, most of which start with .A JavaServer Pages component is a type of Java servlet that is designed to fulfill the ... Read More

How to apply forEach tag in JSP?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

623 Views

The tag is a commonly used tag because it iterates over a collection of objects. The tag is used to break a string into tokens and iterate through each of the tokens.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultitemsInformation to loop overNoNonebeginElement to start with (0 = first ... Read More

LocalDate parse() method in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

165 Views

The LocalDate instance can be obtained from a string value using the parse() method in the LocalDate class in Java. This method requires a single parameter i.e. the string which is to be parsed. This string cannot be null. Also, it returns the LocalDate instance obtained from the string value ... Read More

How to convert Integer array list to float array in Java?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

956 Views

To convert integer array list to float array, let us first create an integer array list −ArrayList < Integer > arrList = new ArrayList < Integer > (); arrList.add(25); arrList.add(50); arrList.add(100); arrList.add(200); arrList.add(300); arrList.add(400); arrList.add(500);Now, convert integer array list to float array. We have first set the size to the ... Read More

Can I use two where clauses like “SELECT * FROM table WHERE condition1 and condition2” in MySQL?

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

252 Views

Yes, you need to use AND or OR operator. The syntax is as follows −select *from yourTableName where yourColumnName1=yourValue AND yourColumnName=yourValue';For AND condition, both conditions must be true otherwise you will get an empty set.To understand the above syntax, let us create a table. The query to create a table ... Read More

LocalDate minus() method in Java

Samual Sam

Samual Sam

Updated on 30-Jul-2019 22:30:25

2K+ Views

An immutable copy of a LocalDate where the required duration is subtracted from it can be obtained using the minus() method in the LocalDate class in Java. This method requires two parameters i.e. the duration to be subtracted and the TemporalUnit of the duration. Also, it returns the LocalDate object ... Read More

Advertisements