×
Home
Jobs
Tools
Coding Ground
Current Affairs
UPSC Notes
Online Tutors
Whiteboard
Tutorix
Login
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
Q/A
Library
eBooks
Courses
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
Syed Javed
has Published
53
Answers
Java default constructor
Java Programming
Java8
Object Oriented Programming
Syed Javed
Published on 22-Apr-2018 20:17:05
Yes! it is supported. A constructor with no arguments is called default constructor. It is used to initialize an object with default values. exampleLive Demopublic class Tester { private String message; public Tester(){ message = "Hello World!"; } public String getMessage(){ ...
Read More
Java copy constructor
Java Programming
Java8
Object Oriented Programming
Syed Javed
Published on 22-Apr-2018 20:02:58
Java has no explicit copy constructor but we can mimic the behaviour. See the following example −ExampleLive Demopublic class Tester { private String message; public Tester(String message){ this.message = message; } public Tester(Tester tester){ this.message = tester.message; ...
Read More
This keyword in Java
Java Programming
Java8
Object Oriented Programming
Syed Javed
Published on 22-Apr-2018 19:47:47
Following are the usage of this keyword. this can be used to get the current object.this can be used to invoke current object's method.this() can be used to invoke current class constructorthis can be passed as a parameter to a method call.this can be passed as a parameter to a constructor.this ...
Read More
Factorial program in Java using recursion.
Java Programming
Java8
Object Oriented Programming
Syed Javed
Published on 22-Apr-2018 19:15:58
Following is the required program.ExampleLive Demopublic class Tester { public static void main(String args[]) { int i, fact = 1; int number = 5; for (i = 1; i <= number; i++) { fact = fact ...
Read More
Palindrome program in Java.
Java Programming
Java8
Object Oriented Programming
Syed Javed
Published on 22-Apr-2018 19:08:15
Following is the required program.ExampleLive Demopublic class Tester { public static void main(String args[]) { int r, sum = 0, temp; int m = 454; int n = m; temp = n; while (n ...
Read More
How to randomize (shuffle) a JavaScript array?
Javascript
Web Development
Front End Technology
Syed Javed
Published on 22-Apr-2018 18:56:46
To randomize a JavaScript array to display random elements, you can try to run the following code:ExampleLive Demo<html> <body> <script> function randomFunc(myArr) { ...
Read More
How to merge two arrays in JavaScript?
Javascript
Web Development
Front End Technology
Syed Javed
Published on 22-Apr-2018 18:48:39
To merge two arrays in JavaScript, use the Array.concat() method. JavaScript array concat() method returns a new array comprised of this array joined with two or more arrays.ExampleYou can try to run the following code to merge two arrays:Live Demo<html> <head> ...
Read More
Binary search in Java.
Java Programming
Java8
Object Oriented Programming
Syed Javed
Published on 22-Apr-2018 18:45:23
Following is the required program.ExampleLive Demopublic class Tester { public static int binarySearch(int arr[], int first, int last, int element){ int mid = (first + last)/2; while( first <= last ){ if ( arr[mid] < element ){ ...
Read More
Fibonacci series program in Java without using recursion.
Java8
Java Programming
Object Oriented Programming
Syed Javed
Published on 22-Apr-2018 18:07:48
Following is the required program.ExampleLive Demopublic class Tester { public static void main(String args[]) { int n1 = 0, n2 = 1, n3, i, max = 5; System.out.print(n1 + " " + n2); for (i = 2; i < max; ...
Read More
What are the methods of an array object in JavaScript?
Javascript
Web Development
Front End Technology
Syed Javed
Published on 22-Apr-2018 18:02:26
The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type.Here is a list of some of the methods of the Array object:S.NoMethod & Description 1concat()Returns a new array comprised of this array joined with ...
Read More
Previous
1
2
3
4
5
6
Next
Advertisements
Print
Add Notes
Bookmark this page
Report Error
Suggestions
Save
Close
Dashboard
Logout