Questions tagged as 'java'

1
answer

Do I need to download the JVM to run a java program on my PC since I am not a developer?

I need to download the JVM to run a java program on my PC since I am not a developer, that is, I will only need the JVM, just to run this program? Better, how do programs made in java run on people's machines without them downloading the JVM, do...
asked by 10.09.2018 / 01:21
1
answer

Draw between Activities [closed]

Good afternoon, I wanted to know how to choose a maximum number in one activity and in the other one to make a draw with the maximum number being the one chosen in the first activity.     
asked by 09.12.2018 / 20:46
1
answer

How to implement the DAO pattern in subclasses?

I am developing an application that is about an arms store. I have class Produto with subclasses Arma , Faca and Municao . In this project I'm applying the DAO standard, but I do not quite understand how your subclass a...
asked by 02.12.2018 / 03:25
1
answer

Ways to instantiate a String in Java [duplicate]

What is the difference between these two ways of instantiating a String in Java? String x = "y"; String x = new String("y");     
asked by 21.11.2018 / 19:38
1
answer

How to check if a field in an array of chars is empty in Java?

I'm trying to check if a certain position in an array of chars actually contains some character. I tried two ways: char[] arr = new char[10]; if(arr[0] == null){ } And also: char[] arr = new char[10]; if(arr[0] == ''){ } When typ...
asked by 28.07.2018 / 02:09
1
answer

For - repeat loop

Hello, I'm new here and in the programming world. I would like to know how to do the last part of this exercise, using For. So far I've done this: for(int i = 1; i<=100; i++) { if(i%2==0) { System.out.println(i+" é par"); }e...
asked by 12.07.2018 / 00:29
1
answer

Get a Get in webclient by passing json as parameter

I am making the request this way, but I am not having success, someone who has already been through it? private static String vwsApiUrl = "http://vws.veloxtickets.com:82/wscinema.ws/Get_Cinema_Programacao"; String url = "'{\"AUTENTICACAO\":{...
asked by 19.07.2018 / 20:02
1
answer

Error "Setting property 'source' to 'org.eclipse.jst.jee.server' did not find a matching property"

I need help to solve the problems that appear in the log log:    Setting property 'source' to 'org.eclipse.jst.jee.server: ApasiSpringMVC' did not find a matching property. Full log: jul 20, 2018 5:17:18 PM org.apache.tomcat.util.dig...
asked by 20.07.2018 / 23:28
1
answer

Error in wrong code in setType "non-static method setType (String)"

android.support.design.widget.FloatingActionButton android:id="@+id/floatingActionButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:onClick="Invite...
asked by 11.06.2018 / 15:27
1
answer

Error database.CursorIndexOutOfBoundsException: Index 0 requested, with a size of 0

The following error is occurring in my application and I can not resolve it. Can you help me ? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.sala304b.padariacoimbra, PID: 15159 java.lang.Run...
asked by 17.06.2018 / 18:05