Questions tagged as 'java'

2
answers

Problems displaying an array of functionaries in a Main class

I have 3 classes involved in this error: TestCompany, Company, Employee. My idea is to create an employee array within Enterprise and print it at TestaEmpresa. For this I made a function called "show ()". It should issue the output through a...
asked by 01.10.2018 / 17:18
1
answer

RPG in turns - Character and enemy receive the same attack

I'm developing an RPG in turns and I'm having problems. The player and the enemy are the same class of instanced object and they have the methods of attacking and receiving damage. However when I attack both characters has life subtracted.   ...
asked by 09.06.2018 / 00:39
2
answers

Know the URL read time

I'm reading content that has a url Using the following code block: String urlNormal = "http://minhaurl"; URLConnection conn = urlNormal.openConnection(); BufferedReader input = new BufferedReader(new InputStreamReader(conn.getInputStream())...
asked by 20.06.2018 / 16:55
1
answer

Interface vs Class - methods visibility

I've done a job for school and it's working perfectly. In the code I have some private methods. Do I need to create an Interface of this class to hide these private methods or can they be in the same class as the public methods? At this po...
asked by 14.05.2015 / 12:51
1
answer

When erasing a character, how do I do something?

I'm using this method to delete the last character typed in a TextView : texto = txtTexto.getText().toString(); int length = texto.length(); txtTexto.setText(texto.substring(0, length - 1)); But when I delete a character, I type a p...
asked by 07.03.2015 / 14:23
1
answer

Too big Array - Android

What problems could I face in handling many arrays ? When I say arrays I mean at least 25 , each containing 1000 index. Performance : Will the performance of my application be affected? I say for example, when loading activity...
asked by 04.04.2018 / 05:47
1
answer

Create a comparison string in Java

When I put in to run the code by Eclipse and I get in the part of typing the login gives an error which I do not and will not go to the next stage that is to enter the password. I wanted some help on how to solve this problem, thank you. Note: I...
asked by 14.03.2018 / 05:19
2
answers

How to change the title of an activity?

I have an activity and I need to change its title programmatically, I found a way but it does not work for me, see: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activi...
asked by 16.03.2018 / 03:42
2
answers

Correct display of RadionButtons

I am trying to implement a JRadioButton but after inserting the 2 in the form, only one is displayed, does anyone help please? package com.roknauta.fasttracker.utils; import java.awt.Component; import javax.swing.JFrame; import javax....
asked by 02.03.2018 / 19:41
1
answer

You need to be using android studio to program in react native [closed]

Do you need android studio to program in react native? My machine does not run the program well, you can hardly use it. While to the emulator I can test the apps by the mobile without problems. I have already been told that I only need to creat...
asked by 26.11.2018 / 16:23