×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Net Meeting
Tutorix
Login
Packages
Categories
Java
JSP
iOS
HTML
Android
Python
C Programming
C++ Programming
C#
PHP
CSS
Javascript
jQuery
SAP
SAP HANA
Data Structure
RDBMS
MySQL
Mathematics
8085 Microprocessor
Operating System
Digital Electronics
Analysis of Algorithms
Mobile Development
Front End
Web Development
Selenium
MongoDB
Computer Network
General Topics
Library
Videos
Q/A
eBooks
Login
Library
Videos
eBooks
Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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
Rahul Sharma
has Published
65
Answers
Find the dimensions of 2D array in Java
Java 8
Object Oriented Programming
Programming
Rahul Sharma
Published on 06-Feb-2018 14:58:05
Following example helps to determine the upper bound of a two dimensional array with the use of arrayname.length.https://www.tutorialspoint.com/javaexamples/arrays_upperbound.htm
How to empty an array in Java
Java 8
Object Oriented Programming
Programming
Rahul Sharma
Published on 06-Feb-2018 14:46:16
Use List.clear() method to empty an array.Exampleimport java.util.ArrayList; import java.util.List; public class Tester { public static void main(String[] args) { List<String> list = new ArrayList<>(); list.add("A"); list.add("B"); list.add("C"); list.add("D"); list.add("E"); ...
Read More
How to convert a byte array to hex string in Java?
Java 8
Object Oriented Programming
Programming
Rahul Sharma
Published on 06-Feb-2018 13:38:17
Use Integer.toString(int, redix) where int is byte to be converted and redix is 16 for hexadecimal format.
How to convert an Array to a Set in Java?
Java 8
Object Oriented Programming
Programming
Rahul Sharma
Published on 06-Feb-2018 11:23:29
Following program is converting an Integer[] to Set<Integer>:ExampleLive Demoimport java.util.Arrays; import java.util.HashSet; import java.util.Set; public class Tester { public static void main(String[] args) { Integer[] numbers = {1, 2, 3, 4, 5}; Set<Integer> set = new HashSet<Integer>(Arrays.asList(numbers)); System.out.println(set); ...
Read More
How do I declare and initialize an array in Java?
Java 8
Object Oriented Programming
Programming
Rahul Sharma
Published on 05-Feb-2018 14:46:43
Following example shows how to create and initialize an array in a single statement.public class Tester { public static void main(String[] args) { int[] dataArray = {1, 2, 3, 4}; for(int i: dataArray){ System.out.println(i); } ...
Read More
What is final parameter in Java
Java
Java Programming
Java 8
Rahul Sharma
Published on 02-Feb-2018 14:26:47
A final parameter is a final variable. Once passed it cannot be modified. A reference variable declared final can never be reassigned to refer to an different object.However, the data within the object can be changed. So, the state of the object can be changed but not the reference.This is ...
Read More
Is there a way to print all methods of an object in JavaScript?
Javascript
Web Development
Front End Technology
Rahul Sharma
Published on 01-Feb-2018 15:07:10
To get all the method, use Object.getOwnPropertyNames(). This returs all properties that belong to an object.ExampleYou can try to run the following code to get all methods −Live Demo<!DOCTYPE html> <html> <body> <script> document.write("<br>"+Object.getOwnPropertyNames(Math).filter(function (p) { ...
Read More
How to format a JavaScript date?
Javascript
Web Development
Front End Technology
Rahul Sharma
Published on 01-Feb-2018 14:38:13
JavaScript date follows the formatting formats −Date TypeFormatISO Date"2017-11-29" (The International Standard)Short Date"11/29/2017"Long Date"29 Nov 2017"Full Date"Wednesday November 29 2017"ExampleHere’s how you can display current date −Live Demo<!DOCTYPE html> <html> <body> <p>Click below to get the current date:</p> <button onclick="display()">Display Date</button> ...
Read More
How to include an external JavaScript inside an HTML page?
Javascript
Web Development
Front End Scripts
Rahul Sharma
Published on 22-Jan-2018 11:38:44
The HTML <script> tag is used for declaring a script within your HTML document. Through this, you can define client-side JavaScript. But, what if you want to add external JavaScript inside an HTML Page? Well, you can easily do that too using the src attribute of the <script> tag.The following ...
Read More
What are the different <meta> tags to define special meta information in HTML page?
HTML
Web Development
Front End Technology
Rahul Sharma
Published on 22-Jan-2018 11:02:53
The <meta> tag is used to define metadata within HTML document like information, keywords, author, etc. With HTML5, you can set viewport with the <meta> tag.Here are the different ways to add meta information and use the <meta> tag −AuthorUse the following to add the author of the web page.<meta ...
Read More
1
2
3
4
5
6
7
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout