Category "java"

Get seconds between next day with time

I am trying to get the Duration until the next time, depending on a Day of Week in Java. I want to be able to schedule a Java task for the next day in a list, a

I ned a while loop statment that makes the calculations loop and ask again

im not too sure how you add a loop statement to this. I want it to be a while loop that makes it do that the calculations repeat after finishing. I've tried but

Accessing specific elements in Arraylist of Objects

Really confused on how to access just the age of a specific student where all the information of students have been stored in a textfile. I am reading the textf

/Main.java:17: error: non-static variable this cannot be referenced from a static context ^ 1 error [duplicate]

In this simple code can anyone explain me what's wrong ? public class Main { public class UserValidator { public void validateName(String

In Java how to synchronize cache read and write operations

I am working on implementing a simple cache using ArrayList in my application. I would like to synchronize cache update operations, while updating the cache I s

What is the way around this error "java.lang.RuntimeException: PowerMock internal error: Should never throw exception at this level"

java.lang.RuntimeException: PowerMock internal error: Should never throw exception at this level at org.powermock.modules.junit4.internal.impl.PowerMockJUnit44R

Java File Naming [duplicate]

I'm new to Java. I want to know why Java doesn't give an error and lets the compiler compile it when I write as class class-name without publi

iText 7 - How to send to an API and receive/render on the other end

I am trying to send a PDF that will be created in memory from one API to another API which will then render it in an HTML page. Info about my technologies: Spri

E-commerce background business process Java and Spring

I need create a ecommerce api using Java and Spring. But how create a background process, for example: After place order, i need send confirmation e-mail, wait

What's the best approach to verify integrity for crypted files on AWS EFS?

Hello i'm working for the first time with AWS EFS, and for security reasons in my organization data will be stored encrypted, but not with AWS standard EFS encr

Mac terminal not valid context

I'm a new Mac user. I'm receiving this error every time I open my terminal and I'm not sure what its about. I was hoping someone can help me with this issue. Th

ANTLR4 error recovery issues for class bodies

I've found a strange issue regarding error recovery in ANTLR4. If I take the grammar example from the ANTLR book grammar simple; prog: classDef+ ; // match o

How to write a recursive function to calculate the frequency of characters in a char array [duplicate]

My goal is to write a program to determine the frequency of characters in a char[]. The test case for my program is written below: Expected: E

Socket.IO cannot establish a connection

I use socket.io-client for Javascript server on JAVA and when I enter address 'ws://10.201.223.67:9902/' the request is not by 'ws' but by 'http'. It returns

How to check if a traversion has reached a certain Index in a 2D-Array in Java?

Let's say we have a 2D-boolean Array as a presentation of a maze, the size of the Array is not fixed and random. The walls are depicted as true: boolean[][] maz

Configure spring boot application using command line argument

So far I have found 2 methods to configure spring boot application at startup, one uses -D and the other one uses -- like this: java -jar -Dspring.profiles.acti

Admob Android SDK 20.x : how to init InterstitialAd?

I update my app with Admob Android SDK 20.x. In the previous versions of the SDK, it was possible to do something like this (in order to avoid to repeat the cod

Android project can't find net.sourceforge.jtds.jdbc.Driver

I want to connect database to android project using android studio and sql server management studio. I add dependencie in build.gradle, but when I try to login

Problem with a recyclerview adapter in android?

I am working on a game called Space Mines. I am trying to get a list of planets on the screen, but am having trouble and do not know why. I try to debug the app

Soap Request with Apache Camel

i have a wsdl file hosted on a site (which i can't share), and i want to invoke a soap request through apache-camel framework. I created a maven project, and us