I need to create 2 loops going from 1 to 10, just one inside another.
WORKS
Using for and for.
Using while and for.
Why does not it work?
1) WHILE AND WHILE
int a=1, b=1;
while(a<=10) {
while(b<=10)...
Good afternoon, what does the following error mean?
Class not found stancedriver.StanceDriver
java.lang.ClassNotFoundException: stancedriver.StanceDriver
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loa...
I'm reading a vector in java and making the sum of all elements but this is saying that they are incompatible type, how to solve
My code
package capitulo2;
import java.util.Scanner;
public class Capitulo2 {
public static void main(String...
How to compare three items with the same result?
I'm currently doing the following, but so the code design does not look elegant.
if ($title == 0 && $squad == 0 && $level == 0) {
return true;
}
What I'm wanting is somethi...
I have the following code:
public class Main {
public static void Main (String[] args) {
Metodo R = new Metodo();
Scanner entrada = new Scanner(System.in);
int[] valores = new int[10];
int i = 0;
whi...
I need some help, I have this: com.thoughtworks.xstream.core.TreeMarshaller $ CircularReferenceException
And I can not find the solution.
Here is the snippet of code:
XStream xstream = new XStream(new JettisonMappedXmlDriver());
xstrea...
public enum enumUpdateAction {
NEW(0), CHANGE(1), DELETE(2), DELETE_THRU(3), DELETE_FROM(4);
public int codigo;
enumUpdateAction(int codigo) {
this.codigo = codigo;
}
public int getCodigo() {
return this.c...
How can I write to a file without deleting what's inside it? I'm using the classes below.
public void criarArquivos() throws IOException{
/*1 forma*/
FileWriter arqTeste = new FileWriter("teste.txt");
PrintWriter gravaTeste = new...
I'm trying to create a contacts calendar in java, I'm using some classes that were requested in the exercise.
the main class:
import java.util.Scanner;
public class Lista15Q03 {
public static void main(String[] args) {...
I would like to know if it is possible to execute a certain function only when the activity is called by another particular activity . for example: Activity A called Activity B , in this case execute Y function, but if...