chevron_left

Recent posts tagged java

0 0 1 min.
During the development of real-time applications, many times developers need to check whether the given input is a number or not. For Example, a mobile number, the user needs to check whether the number entered by a user contains only digits or not. ...
posted Jul 28, 2020 Farkhanda Athar 0 points
0 0 1 min.
Java can call a method from another class by using the behavior and the access level is present there. Following access modifiers can be used within the methods.Access level / Modifiers:Public:In public modifiers, methods are visible to any other cla...
posted Jul 23, 2020 Farkhanda Athar 0 points
0 0 1 min.
In a java programming language, int is a primitive data type while the integer is a wrapper class.int is a primitive data type that provides less flexibility. We can only store the binary values of an integer in it.Since the integer is a wrapper clas...
posted Jul 20, 2020 Farkhanda Athar 0 points
3 0 1 min.
In this article, we will learn how to check if the given character is a number or a character in java.The character class is a subclass of Object class and it tries to wraps a value of primitive type char in the object. An object that is the type of ...
posted Jul 13, 2020 Hiba Waqar 0 points
5 0 1 min.
In this post, we will learn how to convert an integer to a binary string of a specific length in java. The solution should be left-pad the binary string with leading zeros.There are several ways of converting an integer to binary format in java.Strin...
posted Jul 13, 2020 Farkhanda Athar 0 points
5 0 1 min.
The file containing the java code must end with the .java extension.Java file information.Java is a multi-purpose programming language that can easily facilitate communication between humans and computers. Programmers can write javascript in any text...
posted Jul 7, 2020 Farkhanda Athar 0 points
0 0 2 min.
Solution:Run this below code that should solve your problemCode:class Main { public static void main(String[] args) { String[] playersArray = {"Celine", "Amelia", "Olivia"}; int[] powerArray = {4, 2, 10}; //unsorted arra...
posted Jul 1, 2020 Tushar Shuvro 576 points
0 0 1 min.
To write these statements, first, we have to understand what is string variables?String variables:String variables are those variables that are used to hold the strings. This string is a sequence of characters. In java String is an immutable object, ...
posted Jun 15, 2020 Farkhanda Athar 0 points
5 0 1 min.
No both the character literals and string literals cannot be assigned to the char variables. To understand the reason lets look at the precise definition.Character string:The character string is composed of constant characters. It is represented by t...
posted Jun 14, 2020 Hiba Waqar 0 points
0 0 1 min.
Grep is the fastest way to find the fixed string in Unix. It is designed for only one thing and it only performs those actions that do very well.Increase speed:However, to speed up the things there, you should have to try a couple of things.First poi...
posted Jun 13, 2020 Farkhanda Athar 0 points
0 0 1 min.
PHP is a server-side programming language and used to render the output in HTML while the javascript is a client-side programming language. So the PHP variable value can be assigned in a javascript variable. We cannot assign the javascript variable v...
posted May 3, 2020 Farkhanda Athar 0 points
0 0 2 min.
Solution:Step 1: Consider that you don’t want the background size to shrink at the time user resizes. So, you have to include the min-width property to beckground. Step 2: CSS Media QueriesYou have a option to go with CSS media q...
posted Apr 23, 2020 Tushar Shuvro 576 points
0 0 1 min.
Solution: Following this code sheet you are able to display data from databaseCode Sheet:import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.Date; import java.sql.DriverManager; import java.sql.ResultSe...
posted Apr 23, 2020 Tushar Shuvro 576 points
7 0 1 min.
Well, technically, there is no direct answer to this question. There are cases where using these methods is okay (makes sense) and cases where it is not. Deciding whether it is appropriate to use one of these methods in a given scenario nee...
posted Apr 6, 2020 Alex Samson 0 points
7 0 3 min.
These keywords (except package-private) are used to manage access or visibility of class attributes (which represent data) to other classes that interact with the class that contains the attribute(s). So what are the major differences between th...
posted Apr 6, 2020 Alex Samson 0 points
6 0 1 min.
What are these methods?The equals() and hashCode() methods are part of the root Object class. So every class you write is able to implement these methods as neccessary as all classes stem from this parent class.The equals() method returns true&n...
posted Apr 6, 2020 Alex Samson 0 points
4 0 2 min.
Let’s start with the obvious question—what is an UnsupportedClassVersionError?At different times Java developers may be forced to work with different versions of the Java JDK. And sometimes they may need to compile Java source c...
posted Apr 6, 2020 Alex Samson 0 points
11 0 2 min.
Understanding how to prevent Java’s ArrayIndexOutOfBounds exception requires one to first know what the exception is. Taking a closer look at the official documentation tells you that the ArrayIndexOutOfBoundsException is a child class of the I...
posted Apr 6, 2020 Alex Samson 0 points
43 1 1 min.
I have a java problem that says,write code to complete printfactorial()'s recursive case. sample output is 120 if the input is 5:I researched a lot on this and find a way to make this happen.Solution:So, after researching a lot, and getting a lot...
posted Mar 19, 2020 Naymulhasan 31 points
43 0 1 min.
I started learning java for a few days back. Now I am working on the object-oriented part, and learning the Object and Instance. I figure out the (this.) term in java. What does “this” mean in java? What does it do? Moreover, there are tw...
posted Mar 18, 2020 Naymulhasan 31 points