Articles on Trending Technologies

Technical articles with clear explanations and examples

How to swap two String variables without third variable.

Akshaya Akki
Akshaya Akki
Updated on 30-Jul-2019 3K+ Views

To swap the contents of two strings (say s1 and s2) without the third, first of all concatenate them and store in s1. Now using the substring() method of the String class store the value of s1 in s2 and vice versa.Example Live Demopublic class Sample {    public static void main(String args[]){       String s1 = "tutorials";       String s2 = "point";       System.out.println("Value of s1 before swapping :"+s1);       System.out.println("Value of s2 before swapping :"+s2);       int i = s1.length();       s1 = s1+s2;       s2 = ...

Read More

How to add a Favicon to Your WordPress Site?

George John
George John
Updated on 30-Jul-2019 277 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 need to include a Site Icon in WordPress to add a favicon to your WordPress site. Login to your WordPress website and from the left menu; click Appearance, and then Customize − After that, you will reach the Theme Customization section. Under that, the first sub-section is Site Identity. From there, you need to go to the Site Icon and upload the icon. The size here is 512x512, from which the ...

Read More

Constructors of StringTokenizer class in Java.

Anjana
Anjana
Updated on 30-Jul-2019 286 Views

Following are the important constructors of the StringTokenizer class.Sr.No.Constructor & Description1StringTokenizer(String str)This constructor a string tokenizer for the specified string.2StringTokenizer(String str, String delim)This constructor constructs string tokenizer for the specified string.3StringTokenizer(String str, String delim, boolean returnDelims)This constructor constructs a string tokenizer for the specified string.

Read More

What is static import in Java?

Krantik Chavan
Krantik Chavan
Updated on 30-Jul-2019 813 Views

As import statement allows to use a class without its package qualification, static import allows to access the static members of a class without class qualifications. For Example, to access the static methods you need to call the using class name − Math.sqrt(169); But, using static import you can access the static methods directly. Example Live Demo import static java.lang.Math.*; public class Sample{ public static void main(String args[]){ System.out.println(sqrt(169)); } } Output 13.0

Read More

Maintaining password policy parameters in SAP HANA system

SAP ABAP Expert
SAP ABAP Expert
Updated on 30-Jul-2019 920 Views

Note that actual parameter of password policy section is maintained by indexserver.ini system file. It is recommended that password policy should be configured using Security editor of SAP HANA Studio however this can also be done by editing indexserver.ini file.

Read More

When are python objects candidates for garbage collection?

Rajendra Dharmkar
Rajendra Dharmkar
Updated on 30-Jul-2019 287 Views

A python object or variable will be eligible for garbage collection as soon as all references to it go out of scope or are manually deleted (del x). We would have to presume there were no references to the object anywhere else for it to be garbage collected.

Read More

Changes to indexserver.ini file auditable to maintain password policy in SAP HANA

SAP ABAP Expert
SAP ABAP Expert
Updated on 30-Jul-2019 362 Views

It is recommended that password policy should be configured using Security editor of SAP HANA Studio however this can also be done by editing indexserver.ini file.Note that direct changes to the indexserver.ini file cannot be audited.

Read More

How to call a JavaScript function on submit form?

mkotla
mkotla
Updated on 30-Jul-2019 16K+ Views

The onsubmit event occurs when you try to submit a form. You can put your form validation against this event type. The following example shows how to use onsubmit. Here we are calling a validate() function before submitting a form data to the webserver. If validate() function returns true, the form will be submitted, otherwise it will not submit the data.     The HTML code snippet. …

Read More

Why can't static method be abstract in Java?

radhakrishna
radhakrishna
Updated on 30-Jul-2019 2K+ Views

A static method belongs to class not to object instance thus it cannot be overridden or implemented in a child class. So there is no use of making a static method as abstract.

Read More

How to convert List<Integer> to int[] in Java?

Sreemaha
Sreemaha
Updated on 30-Jul-2019 1K+ Views

You can simply iterate through list and fill the array as shown below −import java.util.ArrayList; import java.util.List; public class Tester {    public static void main(String[] args) {       List list = new ArrayList();       list.add(new Integer(1));       list.add(new Integer(2));       list.add(new Integer(3));       list.add(new Integer(4));       int[] array = new int[list.size()];       for(int i=0;i

Read More
Showing 60781–60790 of 61,248 articles
Advertisements