Yes. Call the method println from System.out (not String.out which doesn't exist), you don't assign a value to it. And you multiply the int you parsed.

String.out.println = mataintal * mataintal;

should be

System.out.println(nr * nr);
Answer from Elliott Frisch on Stack Overflow
๐ŸŒ
Java Square Cafe
javasquare.cafe
Local coffee shop serving espresso coffee drinks | Java Square Cafe | Java Square Cafe
Java Square is a full service coffee shop serving espresso coffee drinks, such as lattes and cappuccinos, blended iced coffees. Our staff of trained baristas strives to pull the perfect shot, steam the most velvety milk and pour the most perfect ...
Discussions

[Java] How do I find the square root of a number then round it up/down
Break down your problem into steps so small that you can solve each trivially, for example: Find a function which gets the square root of a number Store the returned value of a function in a variable Find a function which rounds a number up or down Print a number You can now Google each of these subtasks and chain them together to get your result. Try it and let us know what goes wrong, if anything. More on reddit.com
๐ŸŒ r/learnprogramming
9
0
May 5, 2022
[Java] Square every digit of a number?[Code Explanation]
String result = ""; just initializes the result variable to the empty string "". n /= 10 is shorthand for n = n / 10 result = digit * digit + result This evaluates digit * digit (so digit2 ) and adds result to it. So, if result is initially 81 and digit is 8, it will set result to 8 * 8 (64) plus result (81). In Java, adding an integer to a string first converts the integer to a string, so the result 64 turns into the String "64", and adds it to "81", giving you "6481". More on reddit.com
๐ŸŒ r/learnprogramming
6
8
August 11, 2017
๐ŸŒ
CodeGym
codegym.cc โ€บ java blog โ€บ java numbers โ€บ how to square a number in java
How to Square a Number in Java
September 28, 2023 - Square of 3.5 is: 12.25 Square of 11.1 is: 123.21 Square of 13.0 is: 169.0 ยท In this example, we have used Math.pow(number, POW) method provided by Java to multiply the number with itself to the times โ€œPOWโ€ is passed.
๐ŸŒ
Square
developer.squareup.com โ€บ docs โ€บ sdks โ€บ java โ€บ quick-start
Square Java SDK Quickstart
Calls the list method of the Locations API to retrieve the locations associated with the Square account. If the request is successful, the code prints the location information in the terminal. ... The Java code in this Quickstart reads your Square Sandbox access token from a separate configuration file.
Find elsewhere
๐ŸŒ
Instagram
instagram.com โ€บ javasquare
Java Square Cafe (@javasquare)
1,317 Followers, 432 Following, 1,217 Posts - Java Square Cafe (@javasquare) on Instagram: "103 W. Landry/ Opelousas/ LA"
๐ŸŒ
W3Schools
w3schools.com โ€บ java โ€บ ref_math_sqrt.asp
Java Math sqrt() Method
System.out.println(Math.sqrt(0)); System.out.println(Math.sqrt(1)); System.out.println(Math.sqrt(9)); System.out.println(Math.sqrt(0.64)); System.out.println(Math.sqrt(-9)); ... The sqrt() method returns the square root of a number.
๐ŸŒ
Square
developer.squareup.com โ€บ docs โ€บ sdks โ€บ java
Java SDK
Download the Square Java SDK Quickstart sample app and follow the instructions in the README.
๐ŸŒ
Java Plus
java-plus.com
Java Plus
Met Square Specials ยท Clayton Specials ยท We practice hospitality with exceptional food and service to build strong connections with our community! Always Fast, Fresh, & Friendly!! We serve all St. Louis Metropolitan Area from east, west, north, & south, weโ€™ve got you covered!
๐ŸŒ
GitHub
github.com โ€บ square โ€บ square-java-sdk
GitHub - square/square-java-sdk: Java client library for the Square API
Java client library for the Square API. Contribute to square/square-java-sdk development by creating an account on GitHub.
Starred by 66 users
Forked by 36 users
Languages ย  Java 100.0% | Java 100.0%
๐ŸŒ
Quora
quora.com โ€บ How-do-I-square-in-Java
How to square in Java - Quora
Java (programming languag... ... To square a number in Java you multiply it by itself.
๐ŸŒ
Medium
medium.com โ€บ @AlexanderObregon โ€บ checking-if-a-number-is-a-perfect-square-in-java-fce4d6fc80ec
Checking if a Number Is a Perfect Square in Java | Medium
October 21, 2025 - Larger values such as 10,000 are still perfect squares because 100 squared equals 10,000. This means any detection method in code has to scale to numbers both small and large without breaking accuracy. One way to introduce this in Java is by checking a few values directly with a loop and a square comparison:
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ dsa โ€บ calculate-square-of-a-number-without-using-and-pow
Calculate square of a number without using *, / and pow() - GeeksforGeeks
March 29, 2023 - // Simple solution to calculate square without // using * and pow() #include <iostream> using namespace std; int square(int n) { // handle negative input if (n < 0) n = -n; // Initialize result int res = n; // Add n to res n-1 times for (int i = 1; i < n; i++) res += n; return res; } // Driver code int main() { for (int n = 1; n <= 5; n++) cout << "n = " << n << ", n^2 = " << square(n) << endl; return 0; } ... // Java Simple solution to calculate // square without using * and pow() import java.io.*; class GFG { public static int square(int n) { // handle negative input if (n < 0) n = -n; // Initialize result int res = n; // Add n to res n-1 times for (int i = 1; i < n; i++) res += n; return res; } // Driver code public static void main(String[] args) { for (int n = 1; n <= 5; n++) System.out.println("n = " + n + ", n^2 = " + square(n)); } } // This code is contributed by sunnysingh
๐ŸŒ
Reddit
reddit.com โ€บ r/learnprogramming โ€บ [java] square every digit of a number?[code explanation]
r/learnprogramming on Reddit: [Java] Square every digit of a number?[Code Explanation]
August 11, 2017 -
public int squareDigits(int n) {

String result = ""; 

while (n != 0) {
  int digit = n % 10 ;
  result = digit*digit + result ;
  n /= 10 ;
}

return Integer.parseInt(result) ;
}

The above code returns a square of every digit like 99= 8181

I don't understand this code particularly String result = ""; n /= 10 ; and result = digit*digit + result ;

Can Someone Explain? Thanks.

๐ŸŒ
Geva Theatre
gevatheatre.org โ€บ home
Home - Geva Theatre
November 30, 2022 - Experience worldโ€‘class live theatre in Rochester at Geva Theatre - season shows, subscriptions, events & community arts.
๐ŸŒ
Scaler
scaler.com โ€บ home โ€บ topics โ€บ program to find square and square root in java
Program to Find Square and Square Root in Java - Scaler Topics
April 25, 2024 - If you pass an integer or any primitive ... 2) = 100.0 ยท So, in order to find the square of a number, we can pass the base as the number and the exponent as 2....
๐ŸŒ
Study.com
study.com โ€บ business courses โ€บ business 104: information systems and computer applications
How to Square a Number in Java - Lesson | Study.com
March 14, 2018 - If you need to square a number, a very simple solution is to just multiply the number by itself. After all, 52 is really 5 * 5. In this instance, it's totally acceptable to multiply a number by itself, although there is another tool that will ...