Karthikeya Boyini has Published 2383 Articles

What is JSP page redirection?

karthikeya Boyini

karthikeya Boyini

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

261 Views

Page redirection is generally used when a document moves to a new location and we need to send the client to this new location. This can be because of load balancing, or for simple randomization.The simplest way of redirecting a request to another page is by using sendRedirect() method of ... Read More

MonthDay toString() Method in Java

karthikeya Boyini

karthikeya Boyini

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

99 Views

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

Duration toMinutes() method in Java

karthikeya Boyini

karthikeya Boyini

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

142 Views

The value of a duration in the form of a number of minutes can be obtained using the method toMinutes() in the Duration class in Java. This method does not require any parameters and it returns the duration in the form of a number of minutes.A program that demonstrates this ... Read More

Search a value in Java Pair Tuple

karthikeya Boyini

karthikeya Boyini

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

141 Views

Use the contains() method to search a value in JavaTuples Pair class.Let us first see what we need to work with JavaTuples. To work with Pair class in JavaTuples, you need to import the following package −import org.javatuples.Pair;Note − Steps to download and run JavaTuples program If you are using ... Read More

What is a hit count for a Webpage?

karthikeya Boyini

karthikeya Boyini

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

675 Views

A hit counter tells you about the number of visits on a particular page of your web site. Usually, you attach a hit counter with your index.jsp page assuming people first land on your home page.To implement a hit counter you can make use of the Application Implicit object and ... Read More

MonthDay withDayOfMonth() Method in Java

karthikeya Boyini

karthikeya Boyini

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

60 Views

An immutable copy of a MonthDay with the day of month altered as required is done using the method withDayOfMonth() in the MonthDay class in Java. This method requires a single parameter i.e. the day of month that is to be set in the MonthDay and it returns the MonthDay ... Read More

Fetch records in MongoDB on querying its subset

karthikeya Boyini

karthikeya Boyini

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

101 Views

You can use $all operator. Let us first create a collection with documents −> db.subsetOfAnArrayDemo.insertOne({"StudentProgrammingSkills":    ["Java", "MongoDB", "MySQL", "C++", "Data Structure", "Algorithm", "Python", "Oracle", "SQL Server"]}); {    "acknowledged" : true,    "insertedId" : ObjectId("5cb9d1e1895c4fd159f80804") }Following is the query to display all documents from the collection with the help ... Read More

Working with dates before 1970 in MySQL?

karthikeya Boyini

karthikeya Boyini

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

808 Views

You need to use date type to work with date before 1970 because date stores value from 1000 to 9999. A date type can be used when you need to work with date part only not for time purpose.MySQL gives the data in the following format. The format is as ... Read More

Duration negated() method in Java

karthikeya Boyini

karthikeya Boyini

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

87 Views

An immutable copy of a duration where the duration is negated can be obtained using the negated() method in the Duration class in Java. This method requires no parameters and it returns the negated duration. Also, if a numeric overflow occurs the ArithmeticException is thrown.A program that demonstrates this is ... Read More

Create Quartet Tuple from Array in Java

karthikeya Boyini

karthikeya Boyini

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

90 Views

Let us first see what we need to work with JavaTuples. To work with Quartet class in JavaTuples, you need to import the following package −import org.javatuples.Quartet;Note − Steps to download and run JavaTuples program If you are using Eclipse IDE to run Quartet Class in JavaTuples, then Right Click ... Read More

Advertisements