Questions tagged as 'java'

1
answer

How to share an image (ImageView) using Intent?

I'm having a hard time sharing an image from an ImageView from a button, tried several methods, but none worked. Here is an example of what I want to share: link I have an array with the path of the images in Drawable final int[] photo...
asked by 10.05.2017 / 21:08
1
answer

Generate grid with random characters - java

I want to create a grid that is filled randomly or with "W" or "_" and did the following: public class Gerador_grelha { public static void main(String[] args) { int row = 5; int col = 5; String[][] grid = new String[row][col];...
asked by 15.06.2017 / 18:19
1
answer

Problems with Alert Dialog

I'm having a problem picking up a text entry in a dialog box in AndroidStudio. I want to receive the quantity of a product and add it to a ArrayList , however the function does not wait for the insert in the EditText that I added in...
asked by 13.06.2017 / 16:43
2
answers

Reading data from a file with Java

Good evening, I have a text file like the image I need to read this file and grab the data and save it to an object array. For example, I have a SALA object, this object has the following attributes: number = room || north = north ||...
asked by 07.06.2017 / 02:38
1
answer

Error saving related entities - Unsave transient instance

A subsidiary has a product - relationship @OneToOne - and a product has several histories. Implemented registration method: public class CadastroProdutoService implements Serializable { private static final long serialVersionUID = 1...
asked by 07.06.2017 / 14:58
1
answer

Summing up with a child's value from firebase?

Hello , I would like to get a child value in firebase , add number and update child strong> with the result of the sum. Code in OnCreate () uDataBase = FirebaseDatabase.getInstance().getReference().child("Bilhetes").child("total")...
asked by 14.04.2017 / 05:08
1
answer

One-way Relationship OneToMany

Hello everyone! Help me! I have a financial system and I am in doubt in the relationship of User and Account, according to UML. From what my teacher told me, here we have to do a OneToMany in User only, but I realized that account was left with...
asked by 14.04.2017 / 03:22
1
answer

Problem with google maps api getMap () - android

I'm studying google maps api and was using as a basis for my studies video-lessons made available on youtube. However, while I was studying I came across a code depreciation problem. The video lesson you were following is using a function that n...
asked by 18.04.2017 / 23:58
1
answer

Is there any way to clear the screen without cycling with '\ n'?

I would like to know if there are other possibilities besides for example running a series of '\ n'. public void clrscrn(){ for (int i = 0; i < 50; ++i) System.out.println(); }     
asked by 19.04.2017 / 22:01
1
answer

how to retrieve a list of data and display in jsp

Good evening, I'm not able to display a list that is saved in the database on the jsp page. I would like to know how I do, tried some forms, call the menagerBean and the servlet jsp calling by servlet <%@ page language="java" contentTy...
asked by 20.04.2017 / 04:43