Samual Sam has Published 2492 Articles

How to write a JSP Expression?

Samual Sam

Samual Sam

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

389 Views

A JSP expression element contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file.Because the value of an expression is converted to a String, you can use an expression within a line of text, whether or not it ... Read More

How to parse percentages in JSP?

Samual Sam

Samual Sam

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

271 Views

The tag is used to parse numbers, percentages, and currencies.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueNumeric value to read (parse)NoBodytypeNUMBER, CURRENCY, or PERCENTNonumberparseLocaleLocale to use when parsing the numberNoDefault localeintegerOnlyWhether to parse to an integer (true) or floating-point number (false)NofalsepatternCustom parsing patternNoNonetimeZoneTime zone of the displayed dateNoDefault time ... Read More

LocalTime minusNanos() method in Java

Samual Sam

Samual Sam

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

89 Views

An immutable copy of a LocalTime object where some nanoseconds are subtracted from it can be obtained using the minusNanos() method in the LocalTime class in Java. This method requires a single parameter i.e. the number of nanoseconds to be subtracted and it returns the LocalTime object with the subtracted ... Read More

Create Quintet Tuple in Java using with() method

Samual Sam

Samual Sam

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

65 Views

The with() method is used in Java to create Quintet Tuple.Let us first see what we need to work with JavaTuples. To work with Quintet class in JavaTuples, you need to import the following package −import org.javatuples.Quintet;Note − Steps to download and run JavaTuples program. If you are using Eclipse ... Read More

How to randomize and shuffle array of numbers in Java?

Samual Sam

Samual Sam

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

637 Views

At first, create an integer array −int[] arr = { 20, 40, 60, 80, 100, 120, 140, 160, 180, 200};Now, create a Random class object −Random rand = new Random();Loop until the length of the array and shuffle the elements −for (int i = 0; i < arr.length; ++i) { ... Read More

LocalTime minusHours() method in Java

Samual Sam

Samual Sam

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

108 Views

An immutable copy of a LocalTime object where some hours are subtracted from it can be obtained using the minusHours() method in the LocalTime class in Java. This method requires a single parameter i.e. the number of hours to be subtracted and it returns the LocalTime object with the subtracted ... Read More

How to write a comment in a JSP page?

Samual Sam

Samual Sam

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

10K+ Views

JSP comment marks to text or statements that the JSP container should ignore. A JSP comment is useful when you want to hide or "comment out", a part of your JSP page.Following is the syntax of the JSP comments −Following example shows the JSP Comments − ... Read More

Read Data from a Text File using C++

Samual Sam

Samual Sam

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

11K+ Views

This is a C++ program to read data from a text file.Inputtpoint.txt is having initial content as “Tutorials point.”OutputTutorials point.AlgorithmBegin    Create an object newfile against the class fstream.    Call open() method to open a file “tpoint.txt” to perform write operation using object newfile.    If file is open ... Read More

How to format date in JSP?

Samual Sam

Samual Sam

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

4K+ Views

The tag is used to format dates in a variety of ways.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueDate value to displayYesNonetypeDATE, TIME, or BOTHNodatedateStyleFULL, LONG, MEDIUM, SHORT, or DEFAULTNodefaulttimeStyleFULL, LONG, MEDIUM, SHORT, or DEFAULTNodefaultpatternCustom formatting patternNoNonetimeZoneTime zone of the displayed dateNoDefault time zonevarName of the variable to store ... Read More

LocalDate getEra() method in Java

Samual Sam

Samual Sam

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

58 Views

The era for a particular LocalDate can be obtained using the getEra() method in the LocalDate class in Java. This method requires no parameters and it returns the era applicable for the LocalDate.A program that demonstrates this is given as follows −Example Live Demoimport java.time.*; public class Main { ... Read More

Advertisements