English

How does the @Inject annotation work?

I'm a beginner just learning @Inject. I don't really understand how it works. Here I have a field: @Injection private A a; ... ur help There was another question If the abstract is better then I now always use annotations in the fields instead of new?

Constant literals?

Literals In Java, literals are used to represent constant values in a form that is easy to understand. For example, the numbe ... values of variables? Why are literals often called constants? If the constant is this, a fixed value that should not change.

The this keyword

Please tell a novice what does this mean in this code block? I am interested in this line t=new Thread(this); class Callm ... ob1.t.join(); ob2.t.join(); ob3.t.join(); } } This is an example from Schildt on using threads...

Installing Java on a flash drive

Is it possible to install Java directly on a flash drive so that written in Java run directly from the flash drive and do not ... on which it runs? If not, is it possible to find a local installer without downloading the Java stream from the installer?

Java multiproject

The project is written and working, but the question is about the structure. the next task is a question on point 13. Ple ... the application REST-service; model dao services rest WAR file for a WEB-based application. model services rest web

What is @XStreamAlias for in Java?

Why do I need @XStreamAlias in principle?

Java program structure

Good afternoon. I am new to Java, and generally I do programming as an amateur, trying to rise to the professional level. You ... ut then the window rendering code is mixed with the data manipulation logic, or in MainClass, since I create MainFrame in it?

Error:java: error: release version 5 not supported

This is not the first time such problems have occurred, I do not remember how it turned out to be solved, it seems that I cre ... Problem method: public static void main(String[] args) { System.out.println("Hello"); } Screen of project settings:

Memory game in Javascript, comparing cards (variable values)

Good afternoon! I recently started studying JS, and when writing a game, I ran into a problem: how can I compare the cards th ... veClass('closed'); if (guess1 != guess2) { $('guess1').attr("class", "closed"); $('guess2').attr("class", "closed"); } });

How does an implicit call of the toString method occur when creating an instance of a Java class

Please explain on your fingers how the toString() method is called from the SubClass class. After all, this is not a class co ... public static void main(String[] args){ System.out.println( new SubClass() ); } } Program execution result: 43

What are the methods of Object in java?

The base class in Java is known as Object. What are its methods you can name? I found this information: https://habrahabr.ru ... void wait() throws InterruptedException protected void finalize() throws Throwable Can I add something to the information?

JavaScript. Short circuit. Free variables

Hi everyone. I'm learning JavaScript. I stopped on the topic of "Closure". There is a code window.onload = function() { ... s three free variables div, message, count. Question And why is the button not free? Sorry for such an elementary question.

An analog of the List (collection) List from Java in Swift

In Java, any objects could be added to the List. It was very convenient to create a class with various fields (integers, stri ... long ago I switched to swift and I can't find an alternative to such a collection interface there. Tell me if there is one?

Wait and notify methods

I found an example of using wait and notify on the Internet: public class ThreadsApp { public static void main(String[] ... t that the thread has already woken up, and it is woken up 2 more times - how is this from the point of view of correctness?

Vkontakte authorization in pure JavaScript

Hello there is a problem you need to log in to vkontakte only using JavaScript and HTML, I eventually need a JavaScript varia ... oken, I have already tried a bunch of ways nothing worked out of desperation I decided to ask for help. Thank you in advance.

Initializing an array using the Java constructor

You need to implement bubble sorting for the array. In this case, the array is initialized with: an empty constructor that ... } When creating an object, the starter constructor is not called, the array is not initialized. Then NullPointerException.

Read the JSON content for subsequent processing by HTML5 and JavaScript without AJAX and the server

I'm new to web programming. Faced with such a problem. There is a JSON file that is syntactically correct. It stores data, so ... as been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. CORS policy (((

Installing java EE on Ubuntu

I decided to switch to Ubuntu OS. Faced with a lot of problems. I ask for help in finding an adequate manual for installing j ... incorrectly set the command, instead of sudo sh /путь/файл.ѕһ I should have called /путь/файл.ѕһ Thank you all who responded.

Changing the CSS property position via javascript

There is an adaptive fixed menu <script type="text/javascript"> $(document).ready(function(){ var touch = $('#t ... } }); }); </script> Returns the error Uncaught TypeError: Cannot set property 'position' of undefined

Drawing the Swing java component

What method or method can I use to draw a component (for example, a scroll or a text field)? I have a picture drawn as a back ... s for example in this class should I cut in the JTextArea so that it is adequately rendered on top and also works adequately?