
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 2310 Articles

Samual Sam
539 Views
In this section we will see how two sorted lists can be merged using the heapq module in Python. As an example, if list1 = [10, 20, 30, 40] and list2 = [100, 200, 300, 400, 500], then after merging it will return list3 = [10, 20, 30, 40, 100, ... Read More

Samual Sam
7K+ Views
To check whether the entered value is a letter or not in Java, use the Character.isLetter() method.We have a value to be checked.char val = 'D';Now let us use the Character.isLetter() method.if (Character.isLetter(val)) { System.out.println("Character is in Lowercase!"); }else { System.out.println("Character is in Uppercase!"); }Let us see the ... Read More

Samual Sam
194 Views
The isLetterOrDigit() method in Java returns TRUE if the entered value is a letter or digit.We have the following character.char val ='P';Now, let us check for letter or digit using if-else decision-making statement.if (Character.isLetterOrDigit(val)) { System.out.println("Value is a letter or digit!"); } else { System.out.println("Value is neither a ... Read More

Samual Sam
985 Views
To check whether the entered character is a digit, whitespace, lowercase or uppercase, you need to check for the ASCII values.Let’s say we have a value in variable “val”, which is to be checked.For Lower Case.if(val >= 97 && val = 65 && val = 48 && val = 97 ... Read More

Samual Sam
15K+ Views
Use the valueOf() method in Java to copy char array to string. You can also use the copyValueOf() method, which represents the character sequence in the array specified. Here, you can specify the part of array to be copied.Let us first create a character array.char[] arr = { 'p', 'q', ... Read More

Samual Sam
455 Views
To parse and format a number to decimal, try the following code.Example Live Demopublic class Demo { public static void main( String args[] ) { int val = Integer.parseInt("5"); String str = Integer.toString(val); System.out.println(str); } }Output5In the above program, we ... Read More

Samual Sam
2K+ Views
To pass an integer by reference in Java, try the following code −Example Live Demopublic class Demo { public static void display(int[] arr) { arr[0] = arr[0] + 50;; } public static void main(String[] args) { int val = 50; ... Read More

Samual Sam
1K+ Views
To reverse an integer in Java, try the following code −Example Live Demoimport java.lang.*; public class Demo { public static void main(String[] args) { int i = 239, rev = 0; System.out.println("Original: " + i); while(i != 0) { ... Read More

Samual Sam
6K+ Views
To convert decimal to hexadecimal, use any of the two methods i.e.Integer.toHexString() − It returns a string representation of the integer argument as an unsigned integer in base 16.Integer.parseInt() − It allows you to set the radix as well, for example, for hexadecimal set it as 16.Let us see an ... Read More

Samual Sam
2K+ Views
To convert a string to a number in Java, use the Integer.parseInt() method. First, let use create a String and set value.String str = "45";Now, take an Integer and use the Integer.parseInt() method.Integer i = Integer.parseInt(str);Let us see the complete example.Example Live Demopublic class Demo { public static void main( ... Read More