Questions tagged as 'java'

2
answers

Divide a String dynamically based on screen size

I'm working on an android app and at some point I get a String from a web-service that is pretty big, and the client wants that String (which will be shown in an EditText ) is divided into multiple parts, forming a pagination type (I thought...
asked by 18.05.2015 / 20:43
2
answers

Executing JAR by Browser

I'm having trouble figuring out how to do it: What I Wish I want to create a Chrome / Firefox extension that when I press a button on the html of my extension, it runs a .JAR file going through the user settings parameter in the extension....
asked by 30.04.2014 / 22:52
2
answers

Why is it not recommended to use DefaultTableModel?

I looked at some sites on how to fill a table in java, and many were suggested to avoid DefaultTableModel ? Why should you avoid using this class for cases of more complex objects? What does it imply in your use?     
asked by 18.01.2017 / 12:04
1
answer

Why serialize object to send in another Activity?

What is the explanation for serializing the object either using the serializable or Parcelable implementation. I know this serves to create a new instance of the object in the other activity, but why "can not" use the same instance...
asked by 20.08.2015 / 00:35
1
answer

Differences between Java application servers

I would like to know the main differences between Glassfish application servers, JBoss and Apache Tomcat. Is there any specific aspect that I should check before choosing any to start development? Are there significant differences in performance...
asked by 15.12.2015 / 18:29
2
answers

What's the difference between using FileInputStream and FileOutputStream or Scanner and PrintStream?

Is there a big difference between using these classes?     
asked by 01.09.2015 / 02:33
2
answers

Instantiate interface - What's the use? [duplicate]

I learned in college and in all materials that I saw that the interface serves to define a standard that classes should follow and interfaces can not be instantiated. However I came across projects that have an interface and a class that imple...
asked by 16.08.2016 / 02:39
1
answer

What is the difference between Arrays.asList and List.of?

Studying Java 9, I saw a new method that works with collections: List.of , example: List<String> frutas = List.of("maça", "laranja"); I already used Arrays.asList , for example: List<String> frutas = Arrays.asList(...
asked by 06.10.2017 / 14:46
1
answer

Difference between casting and promotion

What is casting ? What is promotion ? What is the basic difference between these types of Java translation?     
asked by 07.12.2015 / 11:40
3
answers

How to copy objects in java

Can you make an object copy in Java? MinhaClasse mc = new MinhaClasse(); MinhaClasse mc2 = mc; But I wanted to make changes to mc2 without affecting mc .     
asked by 30.04.2015 / 17:40