- 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
8K+ Views
The JSON (Java Script Object Notation) is light weight, well accepted data interchange format. Using JSON formatting techniques in Python, we can convert JSON strings to Python objects, and also convert Python Objects to JSON strings.To use these functionalities, we need to use the json module of Python. The json ... Read More
Samual Sam
273 Views
To compare two Java char arrays, use the Arrays.equals() method.Let us first declare and initialize some char arrays.char[] arr1 = new char[] { 'p', 'q', 'r' }; char[] arr2 = new char[] { 'p', 'r', 's' }; char[] arr3 = new char[] { 'p', 'q', 'r' };Now let us compare ... Read More
Samual Sam
416 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
5K+ 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
104 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
784 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
313 Views
To determine a Character’s Unicode Block, use the Character.UnicodeBlock.of() method in Java. The method returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block.Let us see the syntax of Character.UnicodeBlock.of() method.Character.UnicodeBlock of(char c)Here, c is the ... Read More
Samual Sam
310 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
961 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