Skip to content
the poor coder

Home / Topics / #java

#Java

56 posts · page 2 of 3
2020

Hackerrank Java BigInteger Solution

In this problem, you have to add and multiply huge numbers! These numbers are so big that you can't contain them in any ordinary data types like a long integer. Use the power of Java's BigInteger class and solve this…

2020

Hackerrank Java String Tokens Solution

Given a string, , matching the regular expression [A-Za-z !,?._'@]+, split the string into tokens. We define a token to be one or more consecutive English alphabetic letters. Then, print the number of tokens, followed…

2020

Hackerrank Java Anagrams Solution

Two strings, and , are called anagrams if they contain all the same characters in the same frequencies. For example, the anagrams of CAT are CAT, ACT, TAC, TCA, ATC, and CTA. Complete the function in the editor. If and…

2020

Hackerrank Java Datatypes Solution

Java has 8 primitive data types; char, boolean, byte, short, int, long, float, and double. For this exercise, we'll work with the primitives used to hold integer values (byte, short, int, and long): A byte is an 8-bit…

2020

Hackerrank Java Loops II Solution

We use the integers , , and to create the following series: You are given queries in the form of , , and . For each query, print the series corresponding to the given , , and values as a single line of space-separated…

2020

Hackerrank Java Loops I Solution

Objective In this challenge, we're going to use loops to help us do some simple math. Task Given an integer, , print its first multiples. Each multiple (where ) should be printed on a new line in the form: N x i =…

2020

Hackerrank Java If-Else Solution

In this challenge, we test your knowledge of using if-else conditional statements to automate decision-making processes. An if-else statement has the following logical flow: Source: Wikipedia Task Given an integer…

ESC