All questions

  • 0answers
    What to return if not null in JdbcTemplate?
    What is better to return, what is correct, if not null? public User getEmailByName(String name) { try { String sql = "SELECT email FROM user WHERE name=?"; return jdbcTemplate.queryForObject(sql, new EmailByNameMapper(), name); } catch ...
    Java Anonymous, Mar 17, 2019

  • 0answers
    How do I convert a Java 8 lambda string to 7?
    Yes Function private void addAllOrderedStocksToList(List<Integer> list) { Iterator<Integer> amountIterator = data.getNumberOfOrderedStacks().iterator(); Iterator<Integer> lengthIterator = data.getOrderedStackLengths().iterator(); while ...
    Java Anonymous, Mar 31, 2020

  • 0answers
    Java. How can I check that a two-dimensional array is square?
    Hello, a two-dimensional array is passed to the method, I need to check if it is square. I can't figure it out, help me please
    Java Anonymous, Jun 16, 2019

  • 0answers
    How can I print to the console the name of the method in which the exception was thrown?
    The entire call stack is printed using printStackTrace. And how to display only the name of the method in which the exception was thrown to the console?
    Java Norah McGrath, Aug 25, 2019

  • 0answers
    How to output odd numbers from 0 to 20 using FOR?
    You need to write a program that prints odd numbers from 0 to 20 using exclusively a for loop. public class TestClass { public static void main(String[] args) { for (int i = 0; i < 20; i++) { if (i % 2 == 0) { System.out.println(i); } ...
    Java Aiden Foster, May 26, 2020

  • 0answers
    Why doesn't it output and show in red in Java?
    Just started learning Java package;public class Main { public static void main(String[] args) { class Square { Square(int i) { int x =i ;} } class TestSquare { Square S1 = new Square(10); ...
    Java Anonymous, Oct 16, 2019

  • 0answers
    How to orchestrate between microservices in Docker?
    Hello dear members of the forum. I set a task, but I don’t know how to solve it. The bottom line: Several microservices in docker containers, one of which is spring boot. The goal is to transfer data from container to container. For example: We fill in the form in the web-UI. Next, transfer to ...
    Java Julian Barton, Apr 19, 2019

  • 0answers
    3D graphics in Java. Which program / engine to use?
    I have been creating programs (mostly games) in Java for quite some time now. I used to create only games with 2D graphics and I want to try myself in 3D, but I can't find a good engine / training for creating 3D graphics in Java. What do you recommend? If you can recommend something, please ...
    Java Anonymous, Sep 16, 2020

  • 0answers
    Why doesn't the link open in the webview?
    The app has two buttons, when you click on which, two different links open. One link to the login page opens normally, but the referral link does not want to open and gives an error that is in the screenshot.
    Java Anonymous, Jan 28, 2019

  • 0answers
    How do I align an empty triangle?
    Hi, the challenge is to draw an empty triangle. Here's what he wrote public class Test { public static void main(String[] args) { int count = 12; for (int i = 5; i < count; i++) { for (int k = 0; k < count; k++) { if (i == count - 1 || k ...
    Java Anonymous, Aug 8, 2019

  • 0answers
    Can Java be run in a browser in 2020?
    There is network equipment (IPKVM) with access via java. How to be with him? Are there any working methods? Itself on a poppy, but it does not matter.
    Java Lucy Hodge, Nov 27, 2019

  • 0answers
    Can you recommend a couple of good libraries for user telegram bot in java?
    Can you recommend a couple of good libraries for user telegram bot on java?
    Java Anonymous, Oct 13, 2019

  • 0answers
    Which Java core project to choose?
    Hello. I just can't think of a project for my portfolio. To be complex, but at the same time within the framework of Java Core. Help with advice. As for the level of difficulty - maximum or close to maximum.
    Java Anonymous, Aug 11, 2019

  • 0answers
    Is it possible to call sql function via prepared Statement in java?
    Through pgAdmin, I created a function for my database, can I create a request on the server using preparedStatement to call this function, that is, pass it the following line as an argument: private static final String SQL_FUNC_REQUEST = "Select addNode(?, xmlelement(name action, xmlattributes('? ...
    Java Anonymous, Apr 25, 2019

  • 0answers
    How can I read a file from the classpath?
    Greetings to the reader! I need help getting the file from the classpath. The file is specified in the -cp option when running jar through the console. Run jar using: java -cp myjar.jar:dir1/dir2/myfile.txt At the output I get: Exception in thread "main" ...
    Java Fynn Blackwell, Jun 19, 2020

  • 0answers
    How to draw letters into shapes without knowing cycles?
    Reading Yakov Fine's book - Programming in java for children of grandparents' parents, I got a little bewildered. In the book, the author gives the task on page 39 to draw HELLO with asterisks. At the same time, there were no cycles in the book yet. Completed only types. If it is ...
    Java August Alvarado, May 16, 2020

  • 0answers
    What is more promising to learn Java or Kotlin?
    I plan to write applications for android
    Java Brielle Rojas, Jul 30, 2020

  • 0answers
    How does this code work?
    I am learning Java. Trying to read the code. This is the Shield method: public void put (char ch) { if (putloc == q.length - 1) { System.out.println ("- The queue is full"); return; } putloc ++; q [putloc] = ch; I don't understand ...
    Java Avery Huerta, Dec 6, 2019

  • 0answers
    How to read data from a json file and enter it on the screen?
    Hello! The question is actually from above. Googled the topic, but didn't find anything suitable (or just didn't understand). I will be glad if you tell me or share useful links))
    Java Anonymous, Apr 9, 2020

  • 0answers
    Powershell Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.?
    Can't output fail.jar to the console via java command - jar filename.jar gives an error: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: Main has been compiled by a more recent version of the Java ...
    Java Felix Bennett, Feb 23, 2019