Skip to content
Advertisement

Tag: java

I can’t insert more than 10 digit of integer type of data in java

I had a problem by my code. How to insert more than 10 digits of integer, I have searched and can be done by using BigInteger, but I don’t know how to use it in my code using “System.in” can someone help me? thank you before This is my code This my error Answer Simply because int max value is

Java Exercise: I’m not sure what I’m doing wrong and all help is appreciated

I am working with the following pieces of code and I keep getting this error message: Error: Main method not found in class Team, please define the main method as: public static void main(String[] args) or a JavaFX application class must extend javafx.application.Application. All suggestions, opinions, and changes are welcome as I am completely lost on why this isn’t working.

Swapping letters in a word (Java)

I have this question: I tried solving the question through various integer values of i and j. But the most suitable ones I could find was 1 and 5. However even then the output was near to the correct …

Expecting exception during MockMVC.perform in JUnit5

This may be a repeated question. But I have gone through some 10-15 related posts and associated responses which have not resolved my issue. The issue that I am facing is as here below I have a SpringRest controller class with custom ApplicationException. I have written a Junit for my controller and here below is the snippet where I am

how to make more buttons in java GUI swing

I would like to use the java swing to make two buttons, one that add +25 to 100, the initial value, and one other that adds +10 to 100, always the initial value: as you can see it should create two buttons, this is what I receive as output at first: and after I click it, it just adds 25

Jpa Enum error with Smallint type in postgres

I want to put enum in my entity. But I have an error with validation which JPA wonts smallint set as enum. How I can solve this issue. “Schema-validation: wrong column type encountered in column [status] in table [order]; found [int2 (Types#SMALLINT)], but expecting [int4 (Types#INTEGER)]”[enter image description here] Answer Add columnDefinition=”int2” at OrderStatus in your entity. Tested on spring

Advertisement