Questions tagged as 'java'

2
answers

How can I make an arrangement like this

Ask for a name from the keyboard Decompose the letters of the name in an array. Calculate the weight of each letter depending on the position in the alphabet. Add all the weights of each letter of the name and print on the screen only the...
asked by 27.11.2018 / 03:22
1
answer

How to send an input's array to a Spring controller from JavaScript?

I'm having a lot of trouble doing what I need. I'll explain the code and the problem: The user must choose the ice cream tastes that he wishes by clicking on the checkboxes of the image and then send the order through the "Send Order...
asked by 26.11.2018 / 17:02
2
answers

Saving of ArrayList to present [duplicate]

I've been trying to save and load an ArrayList of strings. I do not work.Even I do not see any errors too. Please. public class toDoList extends ListActivity { private Button done; private ListView theList; private EditText listItem; private...
asked by 19.04.2016 / 15:40
1
answer

Help with a webdriver test with geckodriver and selenium ide

I'm using selenium ide the oldest version where you can export the script in testng driverweb format, the issue is that I tried several ways to run the test but I still have problems with the test, here's the code: @BeforeClass(alwaysRun = tru...
asked by 20.11.2018 / 01:44
1
answer

Error when playing shared sound with shared preferences

with an intent I select an mp3 file and I save with URI the location in shared preferences as I found in Google; in another activity a media player element is launched that rescues the uri. But ... I give play to play it and it works I clo...
asked by 24.11.2018 / 19:14
1
answer

Collection Set constructor

I do not understand the difference between these two ways of declaring a constructor: Set<Integer> set1 = new HashSet<>(); Set set2 = new HashSet(); For practical purposes there is a difference, because the two of them w...
asked by 24.11.2018 / 16:52
1
answer

Create serializable file once in java

My problem is that I want to create a System-type object only the first time I start the program, the next time I want to read the saved System file. public static void main(String[] args) { Sistema sistema; try {...
asked by 23.11.2018 / 19:56
2
answers

Pass cycle result For a one-dimensional ARRAY

I have a Bidimensional array called "info", "n" rows and "7" columns. Which I go through with the following code: Note: I start to go through the array starting from column "1"; for (int x=0; x < info.length; x++){ double a=0.0, b=0.0;...
asked by 24.11.2018 / 18:32
2
answers

Rescue the text of an input with Java Selenium

Good afternoon community, I'm trying to rescue the text of the following element: <table class="GroupsTable"> <tbody> <tr> <td> <input type="checkbox" name="chk" value="1"> " texto no s...
asked by 29.11.2018 / 16:11
1
answer

What the getValueAt (i, 0) method returns; if you can not find more cells in a jTable

I am comparing the contents of the cells of a jTable with a String specific, if it finds it proceeds to the corresponding action, but if it does not find it, what does it return? while(!(TabVentas.getValueAt(i, 0).toString().equa...
asked by 07.03.2016 / 20:53