- Trending Categories
- 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
Sreemaha has Published 74 Articles
Sreemaha
218 Views
You can use this keyword to –Differentiate the instance variables from local variables if they have same names, within a constructor or a method.class Student { int age; Student(int age) { this.age = age; } }Call one type of constructor (parametrized constructor or default) ... Read More
Sreemaha
1K+ Views
Fat arrow function solves the issue of lexical binding “this”. It gets the context of “this “and you can fulfill the same purpose since fast arrow does not have its own this. Fat arrow function as the name suggests helps in decreasing line of code. The syntax => shows fat ... Read More
Sreemaha
154 Views
JSRadial gradient with matrix is created in the following way. You can try to run the following way to create JS Radial gradient with matrix −var canvas1 = document.getElementById("canvas"); //canvas1 variable to identify given canvas var ctx1 = canvas.getContext("2d"); //This is used to tell context is 2D var ... Read More
Sreemaha
89 Views
Use the oncanplay attribute to define when an audio/ video is ready to start playing.ExampleYou can try to run the following code to learn how to execute a script when the media is ready to start playing − ... Read More
Sreemaha
380 Views
HTML5's localStorage databases are size-limited. The standard sizes are 5 or 10 MB per domain. A limit of 5 MB per origin is recommended.The following is stated −User agents should guard against sites storing data under their origin's other affiliated sites, e.g. storing up to the limit in a1.example.com, a2.example.com, ... Read More
Sreemaha
796 Views
Following example shows how to remove an element from array. Exampleimport java.util.ArrayList; public class Main { public static void main(String[] args) { ArrayList objArray = new ArrayList(); objArray.clear(); objArray.add(0, "0th element"); objArray.add(1, "1st element"); objArray.add(2, ... Read More
Sreemaha
104 Views
Yes, Storing password in String object is not safe for following reasons −String objects are immutable and until garbage collected, they remain in memory.String being plain text can be tracked in memory dump of the application.In log, String based password may be printed which can cause a problem.Char[] can be ... Read More
Sreemaha
2K+ Views
Just split the string based on space and then iterate it. See the example below −Examplepublic class Tester { public static void main(String[] args) { String test = "I love learning Java"; String[] subStrings = test.split(" "); for(String subString: subStrings) { System.out.println(subString); } } }OutputI love learning Java