Karthikeya Boyini has Published 2383 Articles

String representation of Boolean in Java

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 10:03:36

417 Views

To get the string representation of Boolean, use the toString() method.Firstly, we have used the valueOf() method for Boolean object and set a string value.Boolean val = Boolean.valueOf("false");The same is then represented using “toString() method.val.toString();Let us see the complete example that prints the string representation of Boolean (True and False) ... Read More

zip_entry_compressionmethod() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 10:02:29

32 Views

The zip_entry_compressionmethod() function returns the compression method of a zip archive entry.Syntaxzip_entry_compressionmethod()Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_compressionmethod() function returns the compression method of a zip archive entry.The following is an example. Let’s say we have 3 files in our zip archive "new.txt", therefore the compression method for all ... Read More

zip_entry_name() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:57:57

46 Views

The zip_entry_name() function returns the name of the zip archive file.Syntaxzip_entry_name(zip_entry)Parameterszip_entry − A zip file opened with zip_open() is to be mentioned here.ReturnThe zip_entry_name() function returns the name of the zip archive file.The following is an example. Let’s say we have 5 files in the zip archive "new.zip".ExampleOutputFile Name = ... Read More

zip_entry_close() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:52:55

32 Views

The zip_entry_close() function is used to close a zip archive opened by the zip_entry_open() function.Syntaxzip_entry_close(zip_entry)Parameterszip_entry − The zip entry resource. Required.ReturnThe zip_entry_close() function Returns TRUE on success and FALSE on failure.The following is an example. Let’s say we have "new.zip" file as our archive.ExampleRead More

is_nan() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:51:50

51 Views

The is_nan() function checks for ‘not a number’ value. It Returns TRUE if num is 'not a number', else FALSE is Returned.Syntaxis_nan(num)Parametersnum − The value to checkReturnThe is_nan() function Returns TRUE if num is 'not a number', else FALSE is Returned.ExampleLet us see another example −ExampleRead More

decoct() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:49:13

38 Views

The decoct() function converts a decimal number to an octal. It Returns an octal string of the specified decimal.Syntaxdecoct(num)Parametersnum − The decimal value to convert.ReturnThe decoct() function Returns an octal string of the specified decimal.Example Live DemoOutput106Let us see another example −Example Live DemoOutput72547141460

exp() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:48:06

48 Views

The exp() function Returns ex. This is e raised to the power x.Here, 'e' is 2.718282 x is the powerSyntaxexp(x)Parametersx = The exponentReturnThe exp() function Returns e raised to the power of x, which is a float value.Example Live DemoOutput12.718281828459Let us see another example −Example Live DemoOutput7.3890560989307148.41315910258485165195.40979Read More

floor() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:47:17

124 Views

The ceil() function rounds a number down to the nearest integer.Syntaxfloor(num)Parametersnum − The number to round upReturnThe floor() function Returns the value rounded up to the nearest (down) integer.Example Live DemoOutput0 0Let us see another example −Example Live DemoOutput9Let us see another example −Example Live DemoOutput7 -5Read More

hexdec() function in PHP

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:46:17

87 Views

The hexdec() function converts hexadecimal number to decimal number.Syntaxhexdec(val)Parametersval − The hexadecimal to be converted.ReturnThe hexdec() function Returns the decimal value of val, which is hexadecimal.Example Live DemoOutput1314735

Java Program to check the end of a string

karthikeya Boyini

karthikeya Boyini

Updated on 26-Jun-2020 09:45:42

2K+ Views

To check the end of a string, use the endsWith() method.Let’s say the following is our string.String str = "demo";Now, check for the substring “mo” using the endsWith() method in an if-else condition.if(str.endsWith("mo")) {    System.out.println("The string ends with the word mo"); } else {    System.out.println("The string does not ... Read More

Advertisements