Karthikeya Boyini has Published 2193 Articles

Instant minusSeconds() method in Java

karthikeya Boyini

karthikeya Boyini

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

193 Views

An immutable copy of a instant where some seconds are subtracted from it can be obtained using the minusSeconds() method in the Instant class in Java. This method requires a single parameter i.e. the number of seconds to be subtracted and it returns the instant with the subtracted seconds.A program ... Read More

Provider toString() method in Java

karthikeya Boyini

karthikeya Boyini

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

196 Views

The name and the version number of the provider in string form can be obtained using the method toString() in the class java.security.Provider. This method requires no parameters and it returns the name as well as the version number of the provider in string form.A program that demonstrates this is ... Read More

Java Program to loop through Map by Map.Entry

karthikeya Boyini

karthikeya Boyini

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

200 Views

Create a Map and insert elements to in the form of key and value −HashMap map = new HashMap (); map.put("1", "A"); map.put("2", "B"); map.put("3", "C"); map.put("4", "D"); map.put("5", "E"); map.put("6", "F"); map.put("7", "G"); map.put("8", "H"); map.put("9", "I");Now, loop through Map by Map.Entry. Here, we have displayed the ... Read More

LocalTime truncatedTo() method in Java

karthikeya Boyini

karthikeya Boyini

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

95 Views

An immutable truncated LocalTime object can be obtained using the truncatedTo() method in the LocalTime in Java. This method requires a single parameter i.e. the TemporalUnit till which the LocalTime object is truncated and it returns the immutable truncated object.A program that demonstrates this is given as follows −Example Live Demoimport ... Read More

Compare BigDecimal movePointRight and scaleByPowerOfTen in Java

karthikeya Boyini

karthikeya Boyini

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

283 Views

The java.math.BigDecimal.movePointRight(int n) returns a BigDecimal which is equivalent to this one with the decimal point moved n places to the right. If n is non-negative, the call merely subtracts n from the scale.The java.math.BigDecimal.scaleByPowerOfTen(int n) returns a BigDecimal whose numerical value is equal to (this * 10n). The scale ... Read More

How to check whether a stored procedure exist in MySQL?

karthikeya Boyini

karthikeya Boyini

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

869 Views

Let us first create a stored procedure −mysql> DELIMITER // mysql> CREATE PROCEDURE ExtenddatesWithMonthdemo(IN date1 datetime, IN NumberOfMonth int )    -> BEGIN    -> SELECT DATE_ADD(date1, INTERVAL NumberOfMonth MONTH) AS ExtendDate;    -> END;    -> // Query OK, 0 rows affected (0.20 sec) mysql> DELIMITER ;Now you check ... Read More

LocalTime withSecond() method in Java

karthikeya Boyini

karthikeya Boyini

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

73 Views

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

Provider getService() method in Java

karthikeya Boyini

karthikeya Boyini

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

332 Views

The service that can describe the implementation of a Provider in regards to any algorithm is obtained using the method getService() in the class java.security.Provider. This method requires two parameters i.e. the service type required and the algorithm name of the required service.A program that demonstrates this is given as ... Read More

LocalTime toNanoOfDay() method in Java

karthikeya Boyini

karthikeya Boyini

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

73 Views

The time in the form of nanoseconds of the day can be obtained using the toNanoOfDay() method in the LocalTime class in Java. This method requires no parameters and it returns the time in the form of nanoseconds of the day.A program that demonstrates this is given as follows −Example Live ... Read More

C++ Program to Implement Hash Tables chaining with Singly Linked Lists

karthikeya Boyini

karthikeya Boyini

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

4K+ Views

A hash table is a data structure which is used to store key-value pairs. Hash function is used by hash table to compute an index into an array in which an element will be inserted or searched.This is a C++ program to Implement Hash Tables chaining with singly linked lists.AlgorithmFor ... Read More

Advertisements