Questions tagged as 'java'

1
answer

optional groups in regular expressions

Answering another question in SO, I was asked the question of how to deal with regular expressions when they contain optional groups. For example, if you would like to capture the phone number and favorite number in the following text:   ...
asked by 17.03.2018 / 03:14
1
answer

Merge circle with an icon on Android

To create a circular icon based on the vector icons of Android Studio, I do the following: <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item> <...
asked by 16.03.2018 / 11:17
2
answers

Java Class / en - Storage

I have a question about the storage of the classes, I had created a question about storage, I had answered that ALL classes are stored ( ClaseC a = new ClaseC() ). So, every time I would use new Random() I would be storing ano...
asked by 15.09.2016 / 18:43
2
answers

Define and obtain the current Locale of Configuration in Android N?

How can you assign a locale and get the locale current on Android N? Configuration conf = getResources().getConfiguration(); conf.locale = new Locale("es") // Deprecated String language = conf.locale.getDisplayName() //Deprecated...
asked by 16.09.2016 / 13:14
1
answer

Do double split in Java and get two sets of values

I'm getting this string in Java: Respuesta1_10|Respuesta2_50|Respuesta4_90|Respuesta5_33 And I need to build two groups of values with it dynamically, since the amount of values separated by | is not fixed. The groups of values would...
asked by 07.09.2017 / 06:27
2
answers

List interface with different instantiations

What is the difference, advantages, disadvantages between?: List a=new ArrayList();\suponiendo que introducire numeros enteros ArrayList a=new ArrayList(); \suponiendo que introducire numeros enteros ArrayList<Integer...
asked by 28.08.2017 / 07:38
2
answers

what are the frameworks-dependencies in spring [closed]

   what is the dependency of @services       what is the dependency of @repositories       what is the dependency of @controllers I mean dependencies in the pom.xml file If I'm not wrong @controllers has the dependency    starter.web...
asked by 28.04.2017 / 02:40
2
answers

Error in conditional

Hello, I need to create a queue using vectors in Java and I do not understand why the condition does not work when my vector is full. import java.util.Vector; public class ColaVector { private Vector<Integer> cola = new Vector<In...
asked by 05.05.2017 / 01:11
2
answers

Problem cloning object in java

I'm certainly confused when trying to clone an object. On the one hand and tried to use the interface Cloneable @Override protected Object clone() throws CloneNotSupportedException { // TODO Auto-generated method stub Consult...
asked by 17.04.2017 / 10:59
2
answers

Is it possible to change the background color of a "Floating" Activity?

I need something similar to DialogFragment but with a full class, in other words, create a activity floating%. The procedure is as follows: In my MainActivity pulse on a Item of my ListView and it shows me a contextua...
asked by 28.02.2017 / 15:41