Questions tagged as 'java'

1
answer

Declare a variable using var or the type itself?

I started to study Dart and I came across this questioning. In java, the type is always used in the declaration of a variable. However, Dart allows you to declare both using "var" and variable type, with some exceptions. What would be the most c...
asked by 30.07.2018 / 00:24
1
answer

An error occurred while performing resource injection in the managed state beanController

When I try to run java, this error occurs. I'll send the code. MODEL: package com.pi.drogaria.model; import javax.persistence.Column; import javax.persistence.Entity; @SuppressWarnings("serial") @Entity public class Estado extends Codi...
asked by 08.08.2018 / 05:10
1
answer

How is Java related to MySQL? [closed]

I want to develop expense control software and want to use JavaSwing with MySQL. So I have a question regarding the database. I know it stays on a server, but when I compile the program and want to distribute the software will I have to install...
asked by 01.08.2018 / 23:24
1
answer

Shuffle List

I would like to shuffle an ArrayList, and I'm trying to do this with Collections.sort (), but I do not think it's happening The code I'm using is this: Thread t = new Thread(new Runnable() { @Override public void run()...
asked by 31.07.2018 / 14:11
1
answer

Using a Criteria NOT with Hibernate

Currently, I have a search with Criteria that brings me results normally, but I want to add an implementation of type NOT to it. Does anyone have an idea how I could do this? I put in the code a comment with a possible idea of the i...
asked by 27.07.2018 / 23:49
1
answer

Search a site [closed]

Good afternoon .. I need to do a project in java on netbeans that the program go to the site and look for what was typed in the text field of the program. My theme is recipes and the site is cybercook, typing cake in the search screen of my prog...
asked by 31.03.2015 / 20:13
1
answer

Update Android Database

I am creating a database on Android that has a column called status where it is saving (0 or 1) 0 for when it is without internet and 1 for when it has internet, I want to do the update of the bank for the following to occur, when to return th...
asked by 03.03.2015 / 05:43
1
answer

JTextField field [closed]

How to convert a JTextField component to type Date ? How to do research? How to create a query for the database by returning a list of requests according to a date range? Follow the code currently used: if (opcaoBusca.getSelect...
asked by 14.01.2015 / 17:51
2
answers

Alert appears only 1x within a for

I have a question: I have a method that walks through a list of clients and in it checks if it is of type accountSolidaria = 3, every time the method goes through this list it gives an alert showing a user with a joptionpane that he is suppor...
asked by 24.07.2018 / 16:11
1
answer

Upload an image when opening the application on Android [closed]

I need the moment I open my Android application to load the logo and then Home . Does anyone have the code how to do it?     
asked by 21.09.2017 / 23:58