Questions tagged as 'java'

1
answer

Error when printing a simple variable

I'm not able to print ultra-simple code in Java. You acknowledge the following error:    Exception in thread "main" java.lang.Error: Unresolved compilation problem:       Can not make a static reference to the non-static field at Excript_vari...
asked by 24.02.2017 / 14:36
1
answer

Error in code when compiling [closed]

I created this code in Java and is giving error when compiling via CMD: import java.io.*; import jxl.*; import java.util.*; import jxl.Workbook; import jxl.write.DateFormat; import jxl.write.Number; import jxl.biff.*; import jxl.write.*; impor...
asked by 20.10.2017 / 18:35
1
answer

How do I put a list in disguise with RecyclerView in Android Studio

I need to put the list down, ie the list starts from the java image which should be the first image. This is a RecyclerView     
asked by 20.10.2017 / 20:41
1
answer

Upload and download image to project folder using Spring Boot

I'm developing a web module that I need to upload an image. Do save in the project folder, I'm using the Apache Commons Io: public class FileUtil { public static void saveFile(String path, MultipartFile file){ File saveFile = new...
asked by 07.02.2017 / 22:11
3
answers

How to store values in a vector using inheritance / polymorphism?

I'm starting in the Java language and I came across a problem. It is the following: I have 1 class that calls Vehicle, it has the attribute tag (string) and has 3 classes that inherit it, in the case are: Car (qtdPort int), Moto (qtdCilindradas...
asked by 23.05.2017 / 17:11
1
answer

Registration Screen - User Replay

I have a post code, which registers my users, but they can be repeated, I would like help to make a code so that users can not repeat themselves, however I am new to Android and I do not know how to do this , my code: public class onbuttonclic...
asked by 22.05.2017 / 20:27
4
answers

Organize positions of a vector

I have an exercise that asks you to create two vectors, with real numbers and with 3 elements each. Then copy these values to a new vector with 6 elements. However, the first 3 values must be of the vector that has the highest summation value am...
asked by 18.02.2017 / 16:25
1
answer

Java RESTFULL using Jersey

Well, I'm trying to develop a Java project with a Web Service REST, I'm new to this Web Service business, so I'm kind of lost. I can not access my service by the URL of the browser, when I enter the address of the Service, the browser responds w...
asked by 19.02.2017 / 07:58
1
answer

Good Practice passing arguments to a method when they come from another function

I came across a code similar to the following: private fazerAlgo(AlgumaCoisa algumaCoisa) { Utilidades.converter( formatador.formatarParaTal( algumaCoisa.a, algumaCoisa.b, algumaCoisa.c ) ) } At first glance...
asked by 26.05.2017 / 20:48
1
answer

How to get a json list from an Api in JAVA?

I have the following return of an api {"type":"champion","version":"7.10.1","data":{"89":{"id":89,"key":"Leona","name":"Leona","title":"a Alvorada Radiante"},"110":{"id":110,"key":"Varus","name":"Varus","title":"a Flecha da Vingança"}...
asked by 26.05.2017 / 13:13