Questions tagged as 'java'

2
answers

I used an array in the parameter of a method and I do not know how to execute

import javax.swing.JOptionPane; public class Cliente { private String nome; private String telefone; private int codigo; private String rua; void setRua(String z) { rua = z; } void setTelefone(String t) {...
asked by 01.02.2015 / 20:45
1
answer

Convert roman number to decimal

I'm doing an exercise where I need to convert a typed Roman number, and the program returns a decimal number. My algorithm: import java.util.Scanner; public class NumerosRomanos { public static void main (String args []) { Sy...
asked by 20.10.2016 / 00:43
1
answer

Spring MVC error in performing binding of checkboxes in a list of objects

I have the following code snippet in my .jsp , in which the purpose is to dynamically list a passenger list per customer. <f:form id="service-item-form" action="${action}" modelAttribute="serviceItem" method="post"> <ul id="l...
asked by 20.11.2015 / 14:26
1
answer

Send data to database

I'm studying for a Java test on database and I'm pretty confused, I was doing a program based on another, I made a sign-up screen and it works perfect, the only thing missing is send and I do not know how do this look the example and can not fin...
asked by 21.11.2015 / 17:09
1
answer

Differences between Java and Scala

What are the main differences between Java and Scala? Both have these similarities: Both are object-oriented Both compile to bytecode and run in the JVM Both have lambdas (Java 8)
asked by 11.12.2018 / 11:01
1
answer

How to correct the "SQLException: No suitable driver found" error when making a connection?

I'm trying to connect to the database in my code, however it appears the following error:    Exception in thread "main" java.sql.SQLException:   No suitable driver found for jdbc: mysql: // localhost: 3306 / user Code: public class Con...
asked by 25.09.2015 / 06:59
2
answers

Update the value obtained in an EditText

Next, I'm having a problem getting the value in an EditText and displaying it in a TextView. The value displayed when using a string, is "null", and when using int, it is 0. I believe this happens because the value being collected, is what appea...
asked by 08.05.2014 / 15:53
1
answer

Difficulties with Array Class binarySearch method

I created two arrays one of integers and another of Strings (objects), but when I used the binarySearch method to know the position of the elements, the return of the positions of the Strings array went differently, why did this happen? showin...
asked by 15.04.2014 / 07:07
1
answer

ServerSocket and Socket

I'm trying to create a ServerSocket : public class RunServer { public static void main(String[] args) { try { byte[] buffer = new byte[1024]; String passwordCript; ServerSocket socketRecepcao = new ServerS...
asked by 02.04.2014 / 19:48
3
answers

Identify URLs and create links

If I have text, for example:    Visit www.stackoverflow.com to get your questions answered. How do I identify the URL and link to it: Acesse o <a href="www.stackoverflow.com">www.stackoverflow.com</a> para tirar suas dúvidas...
asked by 10.04.2014 / 18:48