- 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
6K+ Views
The Deque is basically a generalization of stack and queue structure, where it is initialized from left to right. It uses the list object to create a deque.It provides O(1) time complexity for popping and appending.The Dequeis a standard library class, which is located in the collections module.To use it ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
89 Views
The main() function is a global function. It is used to start the execution of program. Every program should have main(). The command line arguments argc and argv are optional.The standard prototype of main() function is as follows.int main() { body } OR int main(int argc, char *argv[]) { body ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
2K+ Views
Let’s say we have the following three values −double val1 = 15.546; double val2 = 25.87; double val3 = Math.PI;Let us now format these double-type numbers. Firstly, we are formatting Euler’s number with Math.exp(). After that, we have also evaluated log. The %.3f you can see here is what we ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
Let’s say we have Double object here.Double obj = new Double("39.45");Now, if we want to convert this Double to short primitive data type. For that, use the in-built shortValue() method.// converting to short primitive types short shortObj = obj.shortValue(); System.out.println(shortObj);In the same way convert Double to another numeric primitive data ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
The power function is used to find the power given two numbers that are the base and exponent. The result is the base raised to the power of the exponent.An example that demonstrates this is as follows −Base = 2 Exponent = 5 2^5 = 32 Hence, 2 ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
79 Views
Let us first declare a Double −Double ob = new Double(99.12);Use the toString() method to convert Double into String.String res = ob.toString();The following is the complete example.Example Live Demopublic class Demo { public static void main(String args[]) { Double ob = new Double(99.12); String res = ob.toString(); System.out.println(res); } }Output99.12Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
328 Views
Array is a collection of same type of elements at contiguous memory location. The lowest address corresponds to the first element while highest corresponds to last element. Array index starts with zero(0) and ends with the size of array minus one(array size - 1). Array size must be integer greater ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
339 Views
The ternary operator is also known as the conditional operator. This operator consists of three operands and is used to evaluate Boolean expressions.Let’s say we have the following two double values.double val1 = 20.0; double val2 = 3.7;Now, let us use the ternary operator to check for the first value.System.out.println(val1 ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
1K+ Views
Here we will see how we can get the UNIX shell style pattern matching techniques using Python. There is a module called fnmatch, which is used to do the work. This module is used to compare file name against a pattern, then returns True or False according to the matches.To ... Read More