English

Java Core. Static modifier

I read a lot about this modifier, but I didn't find the answer to the usual question, but I can't answer it: "What is the adv ... lass method the variable is not static, I got an error... This is not the most convenient choice, as for me.. at this point.

Insert images in a javafx project

In my javafx application, which I create in the IntelliJ IDEA IDE, I need to add images. To fill the shape, background, etc. ... ted the project. Tell me, how do I insert images so that they open on other computers? Thank you in advance for your advice.

the for JavaScript loop

People started learning JS, we need to solve this problem: Write a loop that outputs the following triangle in 7 calls to co ... e.log(pk); //вывел значение переменной в консоль }; What did I do wrong? Don't judge me harshly, I'm new to JS :).

How to properly deploy RestFul written in Java?

I started studying the issue of developing a RestFul service. Developed a Java service in NetBeans, as a PostgreSQL database ... il the deployment of the war file on it) You have a war file(it doesn't matter from which one IDE) We do the following ...

Javascript-click on the url with the opening of a new tab

Good afternoon. window.location.href = "my.url" This code opens the url on the same page, but how do I open a new tab? Thanks.

Which is faster: conditional operation: or if/else

In Java, there are two types of working with the condition: is this a traditional if/else construct and a conditional conditi ... l int result; if (condition) { result = 0; } else { result = 1; } Conditional operation int result = (condition)? 0: 1;

Sorting an array in java

Java. Please help me. You need to sort the array of int numbers in ascending order using a certain method - the first step is ... or (j=1; j<A.length-1; j=j+2); if(A[j]<A[j+1]){ z = A[j]; A[j] = A[j+1]; A[j+1] = z; }

Thread-safe ArrayList

I'm writing my implementation of a thread-safe error list on CAS-locks (don't ask why). I encountered some behavior that I di ... ments, this behavior also occurs, only much less often. I would be grateful if someone could tell me what's going on. Thanks.

Align data in the Java SE console

Hello. I want to make a beautiful data output in the console of one project. It is necessary to make alignment on a column, i.e. that Names under names were, etc. By code, just override toString () + tab. Now it looks like this:

java-Sorting a boolean array

I have a boolean array. How can I sort it so that the values are only false first, and only true after them?

How do I remove identical letters from a string? - Java SE

The question arose: How to remove the same letters from the string? There is this: for(int i = 0; i < word[0].length(); ... ion. Example of operation, it should be like this: input-Java output-Jv That is, all characters that occur more than 1 time

How are enumerations implemented in Java?

Recently, I have been asking questions about the implementation of some data types that are actually part of the language its ... for self-development, as I really like to understand what is "under the engine". Thank you all so much for your help! :)

How is memory allocated for objects in java

In the heap, space is allocated for the object, a reference to it is stored, this I understand how it works, but with inherit ... inning, a place is allocated in the heap for the child and in it, as it were, a reference to the parent or all in one place?

What does the operator mean?

I'm learning JavaFX. I ran into the operator :: . Please explain what it means. Example: public static LocalDate parse(Strin ... urn DATE_FORMATTER.parse(dateString, LocalDate::from); } catch (DateTimeParseException e) { return null; } }

Comparing numbers in a java array

Task: Create an array of 4 random numbers. Display them on the screen, and from a new line display a message about which sequ ... would like to know if it is possible to do this task differently? For example, not from 4 numbers, but let's say 50 or 100.

Why is it recommended in java to name a class with a capital letter?

Why is it recommended in java to name a class with a capital letter?

Java.lang.ArrayIndexOutOfBoundsException error

The code returns the error Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:0 at mass.Uporyadoc.main( ... < n; i++) a[i] = (int) (Math.random() * 11); out.println("Вывод"); sort(a); } }

Java finally

Hello. What is the difference between using finally and putting the code just after the try-catch block? That is, instead of ... of the word return in the try and catch blocks, and the actions that are required when the method ends in the finally block.

Export from Java to doc/docx

You need to create several pages fromjava applications in word. The pages will contain images and text. Without graphs, etc ... t to docx If anyone has any examples, best practices, tips-welcome I also welcome other approaches to solving the problem =)

Implementation of system. arraycopy. Java

Hello. There is a question, does anyone know how system. arraycopy is implemented in Java. Everyone knows that the built-in m ... ements, the speed exceeds the copying cycle. So what's the secret ? It turns out that the method copies the data in blocks ?