Questions tagged as 'java'

1
answer

Triangle in java

I am new to this java theme, and I want to make the following figure. It should come out like this: *** ** * I used the following code: public class MATRIZ { public static void main(String[] args) { for(int j=0; j<3; j+...
asked by 12.11.2017 / 03:18
2
answers

Conflict DELETE Statement with reference to Foreign Key

Use SQL Server 2017 with Management Studio and Java 8. I have a database about movies and I receive an error when trying to delete a movie that is referring to another table that acts as an intermediate. Diagram (example values in red):...
asked by 13.11.2017 / 03:11
2
answers

Java-You have an error in your SQL syntax

Good morning. I am doing a java program that connects to a MySQL database and it is giving me problems to make a select. The code is as follows: try{ St = conexion.createStatement(); ResultSet = St.executeQuery ("SELECT * FROM...
asked by 11.11.2017 / 10:03
3
answers

How to print an array in Java using the for cycle?

I have to print a 4 * 4 matrix in the following way 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 I already tried this, but nothing. The only thing I need help with is that the first variable, j, reaches 4, with that I think it woul...
asked by 29.10.2017 / 21:57
1
answer

Foreach de java me sobre writes the objects

Friends, I have a foreach in java that runs through a list to fill another and send it to my jquery, but I realized that the for is overwriting the objects. Ex: listingMethod (id) [0]) = 'samsung' and listingMethod (id) [0]) = 'iPhone 6...
asked by 29.10.2017 / 00:30
2
answers

How can I pass this exercise to for or while loops

How could I transform this exercise only to for or while loops? Thank you. I leave the code below. Sentence: Create a program that "draws" a square formed by figures successive, with the size indicated by the user, up to maximum of 9. For...
asked by 05.11.2017 / 20:09
3
answers

Go through a vector and compare a random number

When it enters the vector and the number is not in the array it shows me "I do not win a match" the 12 times the vector travels. I want it to only show me once, I do not win and I keep doing the rest of the instructions int azar = (int) (Math....
asked by 14.10.2017 / 12:20
2
answers

How can I upload a .jsp file in Tomcat 8?

My operating system is Ubuntu 16.04.3 LTS , and I downloaded the latest version of Tomcat, 8.55. I have configured apache2 and Tomcat so that Tomcat runs on https, however I have a file in /opt/tomcat/webapp/archivo.jsp that when I...
asked by 10.10.2017 / 08:15
2
answers

Value of cells in html table

I have the following function but only obtains the values of the first row of the body of the table: function manipulaTabla(){ var valor=$('#tablaProductoUnidad tr').find('td').eq(1).html(); document.getElementById('prod_descrip').value=valor;...
asked by 27.09.2017 / 18:39
1
answer

IllegalStateException error using MediaPlayer - Android

I am developing an app, it works, I give the list view the radio I want, it starts to play, but if I try to change the radio it fails. Any solution? Here the LogCat:    10-03 11: 56: 32.895 1410-1410 / com.david.animefm2   D / ViewRoo...
asked by 03.10.2017 / 10:03