About 30,900,000 results
Open links in new tab
  1. Java: How to square a number | alvinalexander.com

    Jul 30, 2024 · Solution 1) Java: Square a number by multiplying it by itself; Solution 2) Java: Square a number with the Math.pow method; More Java power multipliers

  2. How to Square a Number in Java? - JavaBeat

    Dec 30, 2023 · To square a number, built-in and user-defined functions can be used. The built-in methods include “ Math. pow () ” and “ mulitplyExact () ”. On the other hand, the user-defined …

  3. java - Method to return square of a number - Stack Overflow

    Dec 1, 2013 · There isn't a print statement in Java - you need to use the method System.out.println(square(num)); Although, actually, your square method is writing the …

  4. How to Square a Number in Java: A Step-by-Step Guide - Code …

    Feb 11, 2024 · We’ll walk through the process of implementing Java code to square a number like a pro! 💪 Declaring and Initializing a Variable for the Number The first step is to declare a …

  5. java.util.scanner - Java, square a number - Stack Overflow

    I am working on a basic assignment for school, namely to square a number. And, I have written the following code; Scanner scan = new Scanner(System.in); System.out.print("Write a …

  6. How to Square a Number in Java - CodeGym

    Apr 30, 2021 · How to square a number in Java? There are different ways of computing the square of a number in Java, but let’s start with the simplest method. Have a look at the …

  7. How to Square a Number in Java - Liberian Geek

    Dec 17, 2023 · How to Square a Number in Java? A number can be squared by multiplying the number by itself or using the “ Math.pow() ” method. Approach 1: Square a Number in Java by …

  8. How to Square a number In java

    Aug 1, 2022 · We will learn in this tutorial how to square a number in java. We can square in java using multiple methods . First we see what is squaring in java , then we will see example of …

  9. Java - How to find Square of a Number - Techndeck

    Jul 22, 2020 · Java: How to square a number. You can square a number in Java in two different ways: Multiply the number by itself or Call the Math.pow() function...

  10. Java Program to Find Square of a Number - Tutorial Gateway

    Java Program to calculate Square of a Number : In this article we will show you, How to write a Java Program to find Square of a Number using methods with example.

  11. Some results have been removed
Refresh