Karthikeya Boyini has Published 2193 Articles

LocalDate query() Method in Java

karthikeya Boyini

karthikeya Boyini

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

165 Views

The LocalDate object can be queried as required using the query method in the LocalDate class in Java. This method requires a single parameter i.e. the query to be invoked and it returns the result of the query.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; import ... Read More

C++ Program to Construct an Expression Tree for a Postfix Expression

karthikeya Boyini

karthikeya Boyini

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

2K+ Views

An expression tree is basically a binary tree which is used to represent expressions. In expression tree, nodes correspond to the operator and each leaf node corresponds to the operand. This is a C++ program to construct an expression tree for a postfix Expression in inorder, preorder and postorder traversals.AlgorithmBegin ... Read More

Create Quartet Tuple from List in Java

karthikeya Boyini

karthikeya Boyini

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

162 Views

Use the fromCollection() method to create Quartet Tuple from List. Let us first see what we need Let us first see what we need to work with JavaTuples. To work with JavaTuples. Let us first see what we need to work with JavaTuples. To work with Quartet class in JavaTuples, ... Read More

What are advantages of using JSP?

karthikeya Boyini

karthikeya Boyini

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

3K+ Views

Following table lists out the other advantages of using JSP over other technologies −vs. Active Server Pages (ASP)The advantages of JSP are twofold. First, the dynamic part is written in Java, not Visual Basic or other MS specific language, so it is more powerful and easier to use. Second, it ... Read More

LocalDate plus() method in Java

karthikeya Boyini

karthikeya Boyini

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

600 Views

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

Searching BETWEEN dates stored as varchar in MySQL?

karthikeya Boyini

karthikeya Boyini

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

477 Views

You can search between dates stored as varchar using STR_TO_DATE(). The syntax is as follows −select *from yourTableName where STR_TO_DATE(LEFT(yourColumnName, LOCATE('', yourColumnName)), '%m/%d/%Y') BETWEEN 'yourDateValue1' AND 'yourDateValue2’;To understand the above syntax, let us create a table. The query to create a table is as follows −mysql> create table SearchDateAsVarchar   ... Read More

How to apply forTokens tag in JSP?

karthikeya Boyini

karthikeya Boyini

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

230 Views

The tag has similar attributes as that of the tag except for one additional attribute delims which specifies characters to use as delimiters.AttributeDescriptionRequiredDefaultdelimsCharacters to use as delimitersYesNoneExample for           Tag Example                               The above code will generate the following result −Zara nuha roshy

LocalDate toString() method in Java

karthikeya Boyini

karthikeya Boyini

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

327 Views

The string value of the LocalDate object can be obtained using the method toString() in the LocalDate class in Java. This method requires no parameters and it returns the string value of the LocalDate object.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Demo { ... Read More

Generate a random string in Java

karthikeya Boyini

karthikeya Boyini

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

1K+ Views

Let us first declare a string array and initialize −String[] strArr = { "P", "Q", "R", "S", "T", "U", "V", "W" };Now, create a Random object −Random rand = new Random();Generate random string −int res = rand.nextInt(strArr.length);Example Live Demoimport java.util.Random; public class Demo {    public static void main(String[] args) { ... Read More

Set the MySQL primary keys auto increment to be unlimited (or incredibly huge)?

karthikeya Boyini

karthikeya Boyini

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

562 Views

You can use BIGINT but this is not unlimited but you can use large number of primary keys auto increment using it. The syntax is as follows −yourColumnName BIGINT NOT NULL AUTO_INCREMENT;To understand the above syntax, let us create a table. The query to create a table is as follows ... Read More

Advertisements