- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
66 Views
The ezmlm_hash() function calculates the hash value needed when keeping EZMLM mailing lists in a MySQL database.Syntaxezmlm_hash(addr);Parametersaddr − The email address being hashed.ReturnThe ezmlm_hash() function returns the hash value of addr.ExampleThe following is an example −
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
111 Views
Use the divide method to divide one BigDecimal to another in Java. The method returns a BigDecimal whose value is (this / divisor), and whose preferred scale is (this.scale() - divisor.scale()).If the exact quotient cannot be represented (because it has a non-terminating decimal expansion) an ArithmeticException is thrown.The following is ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
147 Views
The “KK” format in Java Date is used to display hour in 00-11.. Use SimpleDateFormat("KK") to get the same format −// displaying hour in KK format SimpleDateFormat simpleformat = new SimpleDateFormat("KK"); String strHour = simpleformat.format(new Date()); System.out.println("Hour in KK format = "+strHour);Above, we have used the SimpleDateFormat class, therefore the ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
4K+ Views
We have the following BigDecimal value −BigDecimal val1 = new BigDecimal("37578975587.876876989");We have set the decimal place to be −int decPlaces1 = 3;Now, we will use the ROUND_DOWN field to set the rounding mode to round towards zero −// ROUND_DOWN val1 = val1.setScale(decPlaces1, BigDecimal.ROUND_DOWN); String str1 = val1.toString(); System.out.println("Result = "+str1);To ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
109 Views
The connection_status() function returns the connection status.Syntaxconnection_status()ParametersNAReturnThe connection_status() function returns the following possible values. This is the status bitfield −0 - CONNECTION_NORMAL - connection is running normally1 - CONNECTION_ABORTED - connection is aborted by user or network error2 - CONNECTION_TIMEOUT - connection timed out3 - CONNECTION_ABORTED & CONNECTION_TIMEOUTExampleThe following is ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
4K+ Views
Let us apply the following operations on BigDecimal using the in-built methods in Java −Addition: add() method Subtraction: subtract() method Multiplication: multiply() method Division: divide() methodLet us create three BigInteger objects −BigDecimal val1 = new BigDecimal("37578975587.876876989"); BigDecimal val2 = new BigDecimal("62567875598.976876569"); BigDecimal val3 = new BigDecimal("72567875598.376876569");Apply mathematical operations on them ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
146 Views
Firstly, let us declare and initialize three long values −long val1 = 98799; long val2 = 98567; long val3 = 98768;Now, find the maximum of three long values using the following condition −// checking for maximum if (val2 > val1) { val1 = val2; } if (val3 ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
65 Views
Let’s create BigDecimal value with a stringBigDecimal val1 = new BigDecimal("37578975.8768"); BigDecimal val2 = new BigDecimal("62567878.9768");You can also set the above as −String str1 = “37578975.8768”; BigDecimal val1 = new BigDecimal(str1); String str2 = “62567878.9768”; BigDecimal val2 = new BigDecimal(str2);Now, you can also perform operations like −val1 = val1.add(val2); System.out.println("Addition ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
310 Views
To convert String to Long, use the valueOf() method.Let’s say the following is our string.// string String myStr = "5"; System.out.println("String: "+myStr);To convert it to Long, we have used valueOf() −Long longObj = Long.valueOf(myStr);The following is the complete example to convert a String value to Long −Example Live Demopublic class Demo ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
5K+ Views
The Z means "zero hour offset", also known as "Zulu time" (UTC) in the ISO 8601 time representation. However, ACP 121 standard defines the list of military time zones and derives the "Zulu time" from the Greenwich Mean Time (GMT).TimeZone can be formatted in z, Z or zzzz formats.The following ... Read More