- 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
V Jyothi has Published 87 Articles
V Jyothi
674 Views
Following is a simple example of a single dimensional array.Example Live Demopublic class Tester { public static void main(String[] args) { double[] myList = {1.9, 2.9, 3.4, 3.5}; // Print all the array elements for (double element: myList) { System.out.print(element + " "); } } }Output1.9 2.9 3.4 3.5
V Jyothi
2K+ Views
Method overriding is an example of runtime polymorphism. In method overriding, a subclass overrides a method with the same signature as that of in its superclass. During compile time, the check is made on the reference type. However, in the runtime, JVM figures out the object type and would run ... Read More
V Jyothi
116 Views
The Arrays class of java package provides you a method named binarySearch() using this method you can perform a binary search on an array in Java.ExampleLive Demoimport java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { int intArr[] = {30, 20, 5, 12, 55}; ... Read More
V Jyothi
6K+ Views
To find the intersection of two arrays in java use two loops. The outer loop is to iterate the elements of the first array whereas, the second loop is to iterate the elements of the second array. Within the second loop compare the elements of the two arrays:ExampleLive Demopublic class ... Read More
V Jyothi
8K+ Views
To make an array iterable either you need to convert it to a stream or as a list using the asList() or stream() methods respectively. Then you can get an iterator for these objects using the iterator() method.ExampleLive Demoimport java.util.Arrays; import java.util.Iterator; public class ArrayToIterable { public static void main(String ... Read More
V Jyothi
96 Views
To remove a property from a JavaScript object, use the delete keyword. You can try to run the following code to learn how to remove a propertyExampleLive Demo var cricketer = { name:"Amit", rank:1, points: 150 }; delete cricketer.rank; document.getElementById("demo").innerHTML = cricketer.name + " has " + cricketer.rank + " rank.";
V Jyothi
196 Views
Use the onfocus attribute to execute a script when the element gets focus in HTML.ExampleYou can try to run the following code to implement the onfocus attribute − Enter subject name below, Subject: function display(val) { document.getElementById(val).style.background = "blue"; }
V Jyothi
327 Views
Use the tag to display inserted text in HTML. The following are the attributes −AttributeValueDescriptionciteURLDefines a URL to another document which explains why the text was deleted.datetimeYYYYMMDD HH:MM:SSDefines the date and time the text was deleted.ExampleYou can try to run the following code to display inserted text − ... Read More
V Jyothi
362 Views
The StringTokenizer class of the java.util package allows an application to break a string into tokens.This class is a legacy class that is retained for compatibility reasons although its use is discouraged in new code.Its methods do not distinguish among identifiers, numbers, and quoted strings.This class methods do not even ... Read More
V Jyothi
2K+ Views
Following is the required program.ExampleLive Demopublic class Tester { static int n1 = 0, n2 = 1, n3 = 0; static void fibbonacci(int count) { if (count > 0) { n3 = n1 + n2; n1 = ... Read More