Good!
Look, I have a class called GIFPanel that inherits from the JPanel class
package Trivia;
import java.awt.Graphics;
import java.awt.Image;
import javax.swing.JPanel;
public class GIFPanel extends JPanel{
private Image imagen;...
My problem as the title indicates I want to know if the first character of a String is a number 9. I have the following code but I want to know if it can be optimized:
String palabra = "9394";
if(palabra != null && palabra.contains("9"...
Good morning,
I'm trying to remove a space with java. The value I get through scraping, for example the value 11 990,00 .
I've tried with:
.replace(" ", "")
.replace("\S", "")
.replace(" ", "z").replace("z",...
Good, I have this method done in Java and the result that returns is a number with many decimals, I would like some way for me to return two decimals only.
Code:
public static float calcularMedia(int[] notas)
{
float resultado =...
I wanted to know if you can give me a basic definition (I'm new to this, that's why I ask for a simple explanation: /) and not so complex of the while and do, especially of the while I have more doubts because I do not understand what it is what...
My question is, how can I show from my main, a method that is returning an array without returning a memory address ?.
My code is now like this.
Main
System.out.println(ciudad1.getMaximas());
//Aqui quiero que me imprima lo que contiene el ar...
In my Java project with Eclipse, I realized that next to the icon of each class appears an icon in the form of a cylinder? I would like to know what the meaning of this icon is:
Hi, I have to do registration (it will be composed of 4 consecutive numbers followed by 3 consecutive letters, without blank spaces between numbers and letters). And I want a method that receives a string enrollment and check that it has an appr...
Hello, good as I show the upper triangle of this matrix, thank you!
System.out.println("Mostra la matriu");
for (int i = 0; i < mat.length; i++) {
for (int j = 0; j < mat[i].length; j++) {
System.out....