1641 Views
Sorting is a way to arrange elements (objects) of a list or array in a certain order. The order may be in ascending or descending order. Another useful class in java.util package.
the java.util package is the Collections class, which include the sort() method for sorting lists alphabetically ...
Anamika Gupta
Dec 15, 2021
2653 Views
To calculate the length of any string or get the elements count of an Array or List, You can use len() function in Python.
1. Length of String
name = "Sheetal Kumar"
size = len(name)
print(size)
Output:
13
2. Length of List:
items = ["A","B","C","D"]
size = len(items)
print(size)
Output:
4
...
Sheetal Kumar
Apr 24, 2019
2332 Views
The String class maintain many efficiency for processing String. However , once a String object is build,its contents will remain same.String object are constant string and StringBuffer object are modified strings. Java can perform certain development involving String because it knows that these object ...
Anamika Gupta
Oct 03, 2018
2634 Views
Class String provides Substrings methods to allow a new String object to be build by copying part of an current String object . Each method returns a new String object.
letters.substring (20)
With the use of Substring method that takes one integer argument. This point specifies the starting ...
Anamika Gupta
Sep 28, 2018
2650 Views
There are four types of SQL (structure query language) operator which is used to operate with all the data types. In the SQL if the attributes or data are used in the list they must be embedded in a single quote ( ' ' ).
Operator
Description
BETWEEN....AND.....
It ...
Anamika Gupta
Aug 07, 2018
4352 Views
String is used to handle a function it is a sequence of characters .There are some of the string with example.
1. addcslashes :-
It return the String with backslashes before the character.
<?php
echo addcslashes('Hello[ ]', 'A..z');
?>
Output
\H\e\l\l\o\[ \]
2. addslashes ...
Anamika Gupta
Jul 14, 2018
2501 Views
Function play an important role in programming language as it organise our code in a proper manner. We can use our code over and over by naming it only. The function works very similar to variable, but they are more powerful than that.
Function Syntax
<?php
function functionName() {
// ...
Anamika Gupta
Jul 10, 2018
6388 Views
Number Methods
In javascript method and properties contain a primitive value and it treat primitive value as a object when it execute its method and properties.
Basic maths calculation with numbers in javascript
const num1=100;
const num2=20;
let val;
//Basic math with numbers
val=num1 ...
Anamika Gupta
Mar 25, 2018
44039 Views
Implode and explode is the basic operation in any programming language. Here i will show you how to join and array or List items in single string or split sting into multiple variables or array in python.
Sometimes you may need to break a large string down into smaller parts or strings. ...
Sheetal Kumar
Feb 08, 2018