
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
645 Views
Following is the Java program to search characters and substring in a string −Example Live Demoimport java.io.*; import java.lang.*; public class Demo { public static void main (String[] args) { String test_str = "Hello"; CharSequence seq = "He"; boolean bool_1 = ... Read More

AmitDiwan
1K+ Views
Yes, parent and child classes can have a method with the same name.Exampleclass Parent { constructor(parentValue) { this.parentValue = parentValue; } //Parent class method name which is same as Child Class method name. showValues() { console.log("The parent method is called....."); ... Read More

AmitDiwan
17K+ Views
To filter JSON data with multiple objects, you can use the concept of filter along with ==.Exampleconst jsonObject= [ { studentId:101, studentName:"David" }, { studentId:102, studentName:"Mike" }, { studentId:103, ... Read More

AmitDiwan
2K+ Views
For this, you can use timeZone from JavaScript i.e. specific time zones for Asia and America respectively.For Asian Time Zonevar todayDateTime = new Date().toLocaleString("en-US", {timeZone: "Asia/Kolkata"});For American Time Zonevar americaDateTime = new Date().toLocaleString("en-US", {timeZone: "America/New_York"});Examplevar todayDateTime = new Date().toLocaleString("en-US", {timeZone: "Asia/Kolkata"}); todayDateTime = new Date(todayDateTime); console.log("The Asia Date time is="); ... Read More

AmitDiwan
3K+ Views
Let’s say the following is our dropdown (select) − Javascript MySQL MongoDB Java Following is the code to display the selected value on Console −Example Live Demo Document Javascript MySQL MongoDB Java function ... Read More

AmitDiwan
433 Views
Type inference in Java refers to the automatic detection of the variable’s datatype. This automatic detection usually happens at compile time. It is a feature of Java 10 and it allows the developer to skip declaring the type that is associated with the local variables. Local variables are those which ... Read More

AmitDiwan
1K+ Views
In order to call the parent method when both parent and child have the same method name and signature.You can use the below syntax −console.log(yourParentClassName.prototype.yourMethodName.call(yourChildObjectName));Exampleclass Super { constructor(value) { this.value = value; } display() { return `The Parent class value is= ... Read More

AmitDiwan
192 Views
Let’s say the following is our Student object −var studentObject = new Object(); studentObject["studentFirstName"] = "John"; studentObject["studentLastName"] = "Doe"; studentObject["studentAge"] = 22; studentObject["studentCountryName"] = "US"; studentObject["studentCollegeName"] = "MIT"; studentObject["studentSubjectName"] = "JavaScript";Let’s find the length.You can use the concept of keys available in object and if the key is present then ... Read More

AmitDiwan
3K+ Views
Let’s say the following are our two arrays −var firstArray = ['John', 'David', 'Bob']; var secondArray = ['Mike', 'Sam', 'Carol'];To combine two arrays into an array of objects, use map() from JavaScript.Examplevar firstArray = ['John', 'David', 'Bob']; var secondArray = ['Mike', 'Sam', 'Carol']; var arrayOfObject = firstArray.map(function (value, index){ ... Read More

AmitDiwan
2K+ Views
For this, you can use onclick=”yourFunctionName()”, and −document.getElementById(“”).value=’’Example Live Demo Document ClearInputText function clearTheTextField(){ console.log("The text box value="+document.getElementById('txtBox').value) document.getElementById('txtBox').value = ''; } To run the above ... Read More