Posts by Android Programmer • 89 points
6 posts
-
0
votes1
answer59
viewsQ: Doubt about the Initializer block
I’d like to know why the code compiles but does not execute? Follows the code: package exemploinicializador2; public class ExemploInicializador2 { private String nome = "Aurélio"; private String…
-
4
votes1
answer2052
viewsQ: Convert Roman number to decimal
I’m doing an exercise where I need to convert a typed Roman number, and the program returns a decimal number. My algorithm: import java.util.Scanner; public class NumerosRomanos { public static void…
-
-1
votes2
answers238
viewsQ: Why is this algorithm in Java not running?
import java.util.Scanner; public class CalculoSalarioLiquido { public static void main (String args []) { System.out.println("Programa para calcular o Salário Líquido: ");…
-
1
votes2
answers696
viewsQ: Calculate the smallest element of a list
Given a sequence of integers (read via Scanner), determine the lower of these values. My code: import java.util.Scanner; public class MenorValorSequencia { public static void main (String args []) {…
-
-3
votes2
answers261
viewsQ: Help in Java: Arrays
Exercise: Make two lists of names in the form of arrays, compare how many names on List 1 are on List 2, and then calculate the percentage of these, about the percentage of total people on List 2.…
-
1
votes1
answer981
viewsQ: Doubt about how to fill two-dimensional array in Java
I’m doing an exercise and I need help. That’s the statement: Calculate average temperatures for each month. For this, create a list containing the names of each month in the rows, and the number of…