Questions tagged [java]

Java (not to be confused with JavaScript) is a class-based, object-oriented, strongly typed, reflective language and run-time environment (JRE). Java programs are compiled to bytecode and run in a virtual machine (JVM) enabling a "write once, run anywhere" (WORA) methodology.

666 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
34 views

Process Extension for Oracle Agile Product Lifecycle Management to update product number field with value from the description field

We are digging into a performance issue with our Agile system. This Process Extension (PX) is used to update the product number field with whatever is in the description field. The product number ...
0
votes
0answers
24 views

Select a value other then currently selected drop down value

Scenario:Select a any other value other then currently selected from a drop down. Please help/review the code and tell me whether this is a efficient solution? ...
0
votes
0answers
21 views

Authentication and auto renewal of an API Token

Following is an https call to retrieve the token, once it's retrieved, it's cached. Callers call the addTokenObserver method that sets a timer based on the token ...
0
votes
0answers
35 views

Templated JSON parsing methods that work with an element or elements array

Consider the following two Java methods. The first takes a JSON string representing one element, the second representing multiple elements. gson.fromJson() can be ...
0
votes
0answers
57 views

Please check my HTTPServlet route parsing extension for quality

Please critique my codebase https://github.com/davidbyng/acme-simple-servlet-extension ...
0
votes
0answers
119 views

Find the smallest subarray with sum greater than a given value

Given some array, find the smallest subarray with a sum that is greater than a value given. So for instance, given this array: {1, -4, -45, 6, 0, 19, 16, 17} ...
0
votes
0answers
579 views

Simple card game with updating GUI

I have coded a simple card game that updates the GUI each second and contains many nodes in game which are used to display game events and animation. People who have tried the game said that their ...
0
votes
0answers
47 views

Inter Thread communication between n thread

The following program takes 3 integer inputs(noOfThreadToBeCreate,fromNo,toNo) and print the Consecutive numbers based on the range using different threads e.g (Thread 1 - Print 1, Thread 2 - print 2, ...
0
votes
0answers
495 views

Join (custom) query in Spring Data JPA

I'm trying to make a REST service using Spring Boot and Spring Data. I have written a query using join and have achieved the required o/p but I'm curious to know if ...
0
votes
0answers
47 views

Optimize the file content comparison

Program to compare if files within two directories are having same content I followed the approach of getting the list of files under two directories recursively and store it in different list with ...
0
votes
1answer
97 views

Fluent interface for Logger

I was trying to wrap a Logback logger in order to provide some handy methods and already defined default keys of the logged json output and I came up with something like this. Do you spot any ...
0
votes
1answer
91 views

Finding the mean using RxJava

I'm learning RxJava and this is what I attempted to find the mean of 'n' transactions. ...
0
votes
1answer
48 views

Handling a response in a @Controller

I have a simple spring controller which takes a @ModelAtrribute object and registers an employee. If it is a success, I forward it to a success, else an error page, ...
0
votes
1answer
7k views

Detect that a class is marked by a custom annotation in Spring

I would like to enable application behaviour based on the presence of a custom annotation that marks the configuration class (normally named something like ...
-1
votes
1answer
862 views

Reading bytes from file to compute its SHA256 hash

I need to get text hash (sha 256), so I need to convert file to its type representation. Is this a fast way to get a byte representation of a file? ...
-4
votes
0answers
69 views

Given an array and an integer k, find the count of contiguous elements after k swaps

Given above the question of some codility challenge, I tried solution given below. Given solution passed all the given test cases but not passed performance test. Please help me to know where my ...

1
10 11 12 13
14