Karthikeya Boyini has Published 2383 Articles

How to declare an object of a class using JSP declarations?

karthikeya Boyini

karthikeya Boyini

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

961 Views

A declaration declares one or more variables or methods that you can use in Java code later in the JSP file. You must declare the variable or method before you use it in the JSP file.Following is the syntax for JSP Declarations −You can write the XML equivalent of the ... Read More

Java Program to extend the size of an Integer array

karthikeya Boyini

karthikeya Boyini

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

228 Views

Let us first create an Integer array −Integer[] arr = new Integer[] { 50, 100, 150, 200, 400, 500, 800, 1000};Now, create a new array with the extended size −Integer[] new_size = new Integer[15];Add elements for the extended size −new_size[8] = 2000; new_size[9] = 3000; new_size[10] = 4000; new_size[11] = ... Read More

Create Quintet Tuple in Java

karthikeya Boyini

karthikeya Boyini

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

76 Views

To create a Quintet Tuple, you can use the with() method.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 parse number in JSP?

karthikeya Boyini

karthikeya Boyini

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

606 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

LocalDateTime format() method in Java

karthikeya Boyini

karthikeya Boyini

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

249 Views

The LocalDateTime can be formatted with the specified formatter using the format() method in the LocalDateTime class in Java. This method requires a single parameter i.e. the LocalDateTime object to be formatted and it returns the formatted LocalDateTime with the specified formatter.A program that demonstrates this is given as follows ... Read More

Java Program to create an array with randomly shuffled numbers in a given range

karthikeya Boyini

karthikeya Boyini

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

115 Views

For randomly shuffled numbers, let us create an integer list and add some numbers −List < Integer > list = new ArrayList < Integer > (); list.add(10); list.add(50); list.add(100); list.add(150); list.add(200);Now, shuffle the elements for random values −Collections.shuffle(list);Create an int array with the same number of elements in the above ... Read More

How to print a date using JSP Expression?

karthikeya Boyini

karthikeya Boyini

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

281 Views

Following example shows a JSP Expression printing date on the browser −           A Comment Test     Today's date: The above code will generate the following result −Today's date: 11-Sep-2010 21:24:25

LocalTime minusMinutes() method in Java

karthikeya Boyini

karthikeya Boyini

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

116 Views

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

Merge contents of two files into a third file using C

karthikeya Boyini

karthikeya Boyini

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

848 Views

This is a c program to merge the contents of two files into the third file.For Example.Inputjava.txt is having initial content “Java is a programing language.” kotlin.txt is having initial content “ kotlin is a programing language.” ttpoint.txt is having initial content as blankOutputfiles are merged ttpoint.txt will have final ... Read More

How to parse currencies in JSP?

karthikeya Boyini

karthikeya Boyini

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

170 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

Advertisements