Questions tagged as 'java'

1
answer

What is the Adapter standard?

What is and how the Adapter pattern works in Java, I am trying to understand this pattern because I will use the same in a project.     
asked by 10.09.2015 / 02:43
4
answers

Client library for REST web services in Java

I'm in a project where you need to access a REST web service and would like to know which Java library is most commonly used to access this type of resource in an easy way. I know that it's even possible to do everything in the hand using the...
asked by 24.01.2014 / 14:57
2
answers

Operator "| "In Java

I can not find any material on the internet explaining the utility of the "|" operator in Java. I know there is the "||" (or) used to test conditions. if(foo == 'a' || foo == 'b') But what about the "|" operator? How useful is it? My...
asked by 29.09.2014 / 20:46
2
answers

How to get the list of devices connected to the network

I need to find the devices connected to the network where my program runs. It's a WiFi network (I do not know if that changes the difficulty of the thing), where I know there are at least two devices connected to the router. Does anyone know...
asked by 30.08.2014 / 18:38
3
answers

How to instantiate a GridView or a ListView for the same Activity?

In my app I'm presenting a list of items. I would like in certain situations to be presented with a ListView and in others as GridView . The situations are: Smartphone (portrait) - ListView Smartphone (landscape) and Ta...
asked by 09.01.2014 / 02:54
1
answer

How to use lambdas and stream?

I can understand lambdas expressions perfectly in simple cases like: () -> 42 // Não recebe nada e sempre retorna "42" x -> x*x // Recebe algo e retorna seu quadrado (x,y) -> x + y // Recebe doi...
asked by 22.06.2015 / 21:10
1
answer

What is the difference between JavaJDK and OpenJDK?

I've been researching and from what I've seen both are kept Oracle skin ... But if java is also open source, what is the need for OpenJDK? Or am I mistaken about Java if open source?     
asked by 29.05.2017 / 20:27
3
answers

Architecture for a JSF Application with Android APP

I'm in the planning part of a web application that I'm going to develop for a Client. There will be CRUDs and some report, nothing too complicated. At the moment I'm writing an architecture so that this application can evolve well without muc...
asked by 03.01.2014 / 19:58
1
answer

Listeners are an Observer implementation?

I'm trying to understand the Observer concept and its implementation, and I ended up finding this example where listeners is used instead of the observable and observer classes: Thisgraphichasbeenremovedfrom , where an altern...
asked by 27.04.2016 / 19:31
1
answer

Differences between getClass (), getResourceAsStream () and getClass (). getClassLoader (). getResourceAsStream ()

In need of loading a resource into my project I came across these two methods. From the choice of one of the two, there were some doubts that I would like to share here. What is the motivation or in what scenario should each be used? Is...
asked by 30.06.2015 / 14:36