Jai Janardhan has Published 78 Articles

String Comparison in Java

Jai Janardhan

Jai Janardhan

Updated on 26-Feb-2020 07:04:54

312 Views

You can compare two Strings in Java using the compareTo() method, equals() method or == operator.The compareTo() method compares two strings. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence ... Read More

Searching characters in a String in Java.

Jai Janardhan

Jai Janardhan

Updated on 26-Feb-2020 06:13:58

8K+ Views

You can search for a particular letter in a string using the indexOf() method of the String class. This method which returns a position index of a word within the string if found. Otherwise it returns -1.Examplepublic class Test {    public static void main(String args[]) {       ... Read More

How Server-Sent Events Works in HTML5?

Jai Janardhan

Jai Janardhan

Updated on 25-Feb-2020 06:55:09

299 Views

Server-sent events standardize how we stream data from the server to the client. To use Server-Sent Events in a web application, you would need to add an element to the document.The src attribute of element should point to an URL which should provide a persistent HTTP connection that ... Read More

How to set the favicon size in CSS rather than HTML attributes?

Jai Janardhan

Jai Janardhan

Updated on 25-Feb-2020 06:32:28

2K+ Views

A favicon is a little icon visible on the web browser tab, just before the page title. It is generally a logo with the smaller size.You cannot add the size using CSS. The standards do not support adding Favicon size using CSS. Let’s add it using attributes, The result after ... Read More

Passing array to method in Java

Jai Janardhan

Jai Janardhan

Updated on 25-Feb-2020 05:05:56

199 Views

Just as you can pass primitive type values to methods, you can also pass arrays to methods. For example, the following method displays the elements in an int array -Examplepublic static void printArray(int[] array) {    for (int i = 0; i < array.length; i++) {       System.out.print(array[i] ... Read More

What does the modifier volatile in Java do?

Jai Janardhan

Jai Janardhan

Updated on 19-Feb-2020 12:41:26

399 Views

The volatile modifier is used to let the JVM understand that a thread accessing the variable should always merge its own personal copy of the variable with the original in the memory.Accessing a volatile variable synchronizes all the cached copy of the variables in the main memory. Volatile can only ... Read More

Using Breakpoint in SAP system

Jai Janardhan

Jai Janardhan

Updated on 14-Feb-2020 05:36:30

116 Views

There is a problem with your code. Here is the correct syntaxSyntaxBREAK username.If you want to implement it for all the users you can just codeBREAK-POINT.

What is the default type of a hexadecimal value in MySQL?

Jai Janardhan

Jai Janardhan

Updated on 11-Feb-2020 10:35:43

136 Views

As we know that in numeric contexts the hexadecimal values act like integers and in string contexts they act like binary string. It can be understood with the help of the following example, mysql> Select X'5455544F5249414C53504F494E54'; +---------------------------------+ | X'5455544F5249414C53504F494E54' | +---------------------------------+ | TUTORIALSPOINT               ... Read More

What are Lvalues and Rvalues in C++?

Jai Janardhan

Jai Janardhan

Updated on 11-Feb-2020 09:52:30

3K+ Views

An lvalue (locator value) represents an object that occupies some identifiable location in memory (i.e. has an address).rvalues are defined by exclusion. Every expression is either an lvalue or an rvalue, so, an rvalue is an expression that does not represent an object occupying some identifiable location in memory.For example, ... Read More

What are literals in C++?

Jai Janardhan

Jai Janardhan

Updated on 11-Feb-2020 08:11:37

360 Views

A literal is any notation for representing a value within the source code. They just exist in your source code and do not have any reference a value in memory. Contrast this with identifiers, which refer to a value in memory.There are several types of literals in C++. Some of ... Read More

Advertisements