Java answers

  • 1answers
    Java program won't start (Error: Could not find or load main class)?
    The simplest program from the book "Learning Java, 2nd Edition" by K. Sierra does not start. I do everything according to the instructions. import java.awt.*;import java.awt.event.*;class Party { public void buildInvite() { Frame f = new Frame(); Label l = new Label("Вечеринка у ...
    Java Anonymous, Jan 13, 2020

  • 2answers
    AES encryption in Java?
    Does Java have built-in AES 256 encryption and how do I use them?
    Java Ivy Gomez, Oct 24, 2019

  • 0answers
    How do I implement the unread status of a new event?
    There is a Crud application in Spring (mvc, security), Hibernate, JSP. There is a table with orders and each order has its own page. There are multiple users. When you add an order, it is assigned a new status and this status should disappear for each user when viewing the order page (by the type ...
    Java Ronan Hunt, Jun 28, 2019

  • 1answers
    How to make memory protection?
    Making a password manager. How can you implement in-memory data protection? I've heard they do it, but I have no idea what it means. Is it what type of data encrypted in memory should be stored and decrypted as needed or what?
    Java Anonymous, Oct 14, 2020

  • 2answers
    How does this code work?
    Good afternoon gentlemen. You can explain this code. How does he work? I mean about methods. Can anyone leave the tutorial on this topic? package sultanov;public class Main { public static void main(String[] args) { String foo = "РИШАТ"; String sam = "РИШАТ1"; ...
    Java Anonymous, Sep 12, 2020

  • 1answers
    How do I sort a HashMap?
    There is a HashMap & lt; K, V & gt; , where V is an object containing fields, so it is necessary to sort the hashmap by one of these fields so that the value of the keys matches the order. Tried sorting through treeMap and custom comparator. I sorted it out, but ran into the problem that there is ...
    Java Elliot Soto, Jun 17, 2019

  • 0answers
    Controlling the number of sent events with constant and real time adjustment.?
    The bottom line is that you need to write an algorithm that would control, when reading a file, the number of lines sent, depending on the time written to these lines, real time (ms) and a specified maximum limit, which would be a control lever for the entire mechanism. Now for the details ...)) ...
    Java Jackson Choi, Apr 19, 2019

  • 3answers
    Passing and returning parameters in functions - how much does it affect performance?
    Has anyone done tests or read articles on this? Does it greatly slow down the processing of a large amount of data when passing strings to other functions and returning them back. For example, not just 1 gear, but 2, 3, 4? I never even thought about it before, but when it comes to billions of ...
    Java Levi Baker, Jul 30, 2019

  • 2answers
    How to free memory in java?
    How do I force memory to be freed before a variable goes out of scope? What are the standard tools for this? I would be grateful for any advice.
    Java Anonymous, Apr 15, 2020

  • 2answers
    What happens if you don't close the read / write stream?
    Hello. The question, I am sure, is simple, but nevertheless it put me in a dead end. What happens if we don't close the read or write stream to a file or database? Well, for example, the record may not call the .flush method (for example Java) (although we can call it instead of the close ...
    Java Scarlett Moss, Mar 14, 2019

  • 0answers
    How to make a prediction in encog?
    I taught the network how to make a forecast of the next value based on this training? that is, he taught in fact by tabulating the function on the interval from 1 to 100, you need to get the value of the function at point 101
    Java Eleanor Cooke, Dec 31, 2018

  • 1answers
    Where can I read about class-loader?
    I can’t figure it out with class-loader, or rather I can’t find suitable literature. Tell me where you can learn more about this!
    Java Anonymous, Mar 14, 2019

  • 0answers
    How to fix an error while creating a package in Java?
    I got to the chapter on packages and interfaces in the book. Console operation is described there. And I work in IDE. In general, by analogy, I created the MyPack package. In it I created the Example class. I launch and crash errors. What I did wrong? How to fix it? Screen - ...
    Java Anonymous, Sep 19, 2019

  • 2answers
    Why create a link to an object?
    I started learning Java. I still can't understand why the object reference is created in the examples? Why can't you do without this link? What is she for? abstract class Figure { double dim1; double dim2; Figure(double a, double b) { dim1 = a; dim2 = b; } ...
    Java Jude Duncan, Apr 12, 2019

  • 0answers
    Garbage collector and finalize method in Java?
    First question. From one article. System.runFinalization () creates a second thread "SecondaryFinalizer" which also calls finalize () on objects from the same queue, the thread that called System.runFinalization () waits until the currently available Finalizer queue ends. I don't ...
    Java Anonymous, Jan 16, 2020

  • 1answers
    How to remove given dependent entity fields from a query using hibernate criteria?
    There are two classes: A and B and, respectively, tables in the database corresponding to these classes. Class B has a LOB field that you don't want to swap out on every request. How can, by pumping out the list of entities A, pull out the list of B-nis, but without the data field, and all ...
    Java Connor Willis, Dec 7, 2019

  • 2answers
    How to avoid duplicate view code correctly?
    In spring mvc I call view and each time I describe the page again, taking into account that the footer and header of the site are the same, tell me how to make it more convenient, for example, in php it was something like this: Generic template.php --- Heder is spelled & lt;? = $ content? & gt; ...
    Java Anonymous, Feb 7, 2019

  • 3answers
    How to log in to the site (Java)?
    Greetings to the forum participants. I am writing a "parser" for a page and ran into some problem. To pull out the data I need, you first need to log in. I rummaged through a lot of ru / eng resources and, unfortunately, could not find a suitable solution. The only, in my opinion, similar ...
    Java Juliette Keller, Jul 20, 2019

  • 1answers
    How to watch help files in java?
    Hello everyone. Tell me how to watch help for classes in java? well, as in python, you open the interpreter, import the classes that you need, and through the help function you can see the description of the class + the methods it contains \ which it supports: import datetimehelp(datetime) ...
    Java Anonymous, Mar 5, 2020

  • 2answers
    Awt.Graphics - draw () works, but drawString () doesn't. Why?
    Hello, actually there is a code: public class PlayerOverlay extends Window { public PlayerOverlay(Window owner) { super(owner, WindowUtils.getAlphaCompatibleGraphicsConfiguration());// setBackground(new Color(0, 0, 0, 0)); setBackground(new Color(255,255,204, 120)); ...
    Java Anonymous, May 15, 2020