- 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
Kumar Varma has Published 110 Articles
Kumar Varma
304 Views
The autocomplete attribute is used with form element to set the autocomplete feature on or off. If the autocomplete feature is on, the browser will automatically show values, based on what users entered before in the field.If the autocomplete feature is off, the browser won’t automatically show values, based on ... Read More
Kumar Varma
2K+ Views
Yes. Java supports labeled statements. You can put a label before a for statement and use the break/continue controls to jump to that label. ExampleSee the example below.Live Demopublic class Tester { public static void main(String args[]) { first: for (int i ... Read More
Kumar Varma
218 Views
A switch statement allows a variable to be tested for equality against a list of values. Each value is called a case, and the variable being switched on is checked for each case.SyntaxThe syntax of enhanced for loop is −switch(expression) { case value : // Statements ... Read More
Kumar Varma
462 Views
The error you are getting is because there is no ODBC drivers installed for your PHP client. You would require downloading the drivers from any site on the internet. Following steps can be performed to download the drivers: Download the drivers from http://www.easysoft.com/cgi-bin/account/login.cgi after registration or alternatively check the ODBC-ODBC Bridge Client ... Read More
Kumar Varma
4K+ Views
ExampleFollowing is the required program.Live Demopublic class Tester { public static int getThirdSmallest(int[] a) { int temp; //sort the array for (int i = 0; i < a.length; i++) { for (int j = i + ... Read More
Kumar Varma
183 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
Kumar Varma
443 Views
Java String class provides different comparison methods namely:The compareTo() methodThis method compares two Strings lexicographically. This method returns a negative integer if current String object lexicographically precedes the argument string. a positive integer if current String object lexicographically follows the argument true when the strings are equal.Exampleimport ... Read More
Kumar Varma
13K+ Views
Use Arrays.copyOfRange() method to get a subarray.Exampleimport java.util.Arrays; public class Tester { public static void main(String[] args) { int[] array = new int[] {1, 2, 3, 4, 5}; int[] subArray = Arrays.copyOfRange(array, 0, 2); System.out.println("Array: "); for(int ... Read More
Kumar Varma
8K+ Views
Member variables are known as instance variables in java.Instance variables are declared in a class, but outside a method, constructor or any block.When space is allocated for an object in the heap, a slot for each instance variable value is created.Instance variables are created when an object is created with ... Read More
Kumar Varma
600 Views
The code you are using \1+ just removes consecutive occurrences only. You can use the below code.SELECT REPLACE_REGEXPR('(.)(?=.*\1)' IN '22331122' WITH '' OCCURRENCE ALL) FROM DUMMYThe output will come out to be “312”. This will remove all multiple occurrences and only last one will be kept.