English

What is the difference between Thread and Runnable?

What is the difference between Thread and Thread (Runnable)? In other words, what is the advantage of the fact that the Threa ... nable interface? Is it like a thread in a thread or will there be some additional functions? For example, access to the UI?..

Compare rows on more, less

I can't find in Java standard mechanisms for checking strings on >, <. I'm sure they're there somewhere...

Method chaining in Java - what is it, and what is it eaten with?

Explain how it lives and how to work with it? The following phenomenon is meant: Strings .emptyToNull(sector)) .stream() .map(ClientCompany::fromCompany) .collect(Collectors.toList());

Add maven in IntelliJ IDEA to a regular java project

How do I do this (exactly the versions 7.0.13). Http://search.maven.org/#artifactdetails%7Cit.unimi.dsi%7Cfastutil%7C7.0.13%7Cjar Add an IntelliJ IDEA to a regular java project ? Not manually by downloading the jar...

Java. Reading from the COM port

There are large industrial scales, data from them comes to the computer on the com port. There is a program running on the co ... , when I opened the port programmatically, will it be available to the program that receives this data and writes to the log?

How does finally work in java?

There is a code: private static int f (){ try { return 1; } finally { return 2; } } public ... 1; //Здесь код метода try } But even if so, it is not clear how the compiler will "see" the catch block, if there is one?

Javafx: get a TableView string

How do I get a string, knowing its number, and set its style (or add a class)? For example, in a table of 10 rows, I need to ... creating a table, but after, when the table is already ready. I click on the button, and the 3rd line is highlighted in red.

Creating a java application launch for" narrow-minded " users

There is a jar archive with a java application. You need to make it so that the user can run the application not from the com ... tarts (under Windows). How do I do this? Write and compile a program, for example, in C#, which will make a java-jar app.jar?

How do I add text to the end of a file in Java?

There is a text file that already stores some information. How can I add data to a file if the write method of the FileWritter class overwrites the old data and writes new ones?

JavaScript, private variables

How can I create a private variable in the class (ecma6 class)?

Java keyboard input

Hi! I solve problems in java through intelijidea. I need to enter two numbers from the keyboard, can I somehow enter them mys ... t j = 1; j <= num2; num2++) { System.out.print(8); } System.out.println(); } } }

How to slow down a video in javascript?

Hi, is it possible to slow down a video in javascript? If so, how? Tell me please.

A random number in the range from -10 to 10 in Java.

Friends, welcome! It is necessary to generate a random number in the range from -10 to 10. nextInt() does not allow this. A ... aster what I wrote (I need the entire code). Not so long ago I started learning Java, don't be strict. Thank you in advance!

using the +=, = Java operators

Why does a compilation error occur in line 1, but not in line 2? public class text { public static void main(String[] args) { byte b1 = 127; b1 = b1 + 1; // 1 b1 += 1; // 2 } }

How can I speed up the algorithm for finding all primes?

I use the Eratosthenes sieve algorithm. A search in the range from 2 to 10000 takes 280 ms. I need to find all the primes in ... ut.println("Формирование коллекции закончено!"); primes.timeRun(); System.out.println(primes.getCountPrimes()); } }

Java check if the type is primitive

How to check in Java a primitive we have or an object?... ..The task in general from the book, Here is this: "Write a program that determines whether the char array is a primitive type or a "real" object.

Java. Error missing "; " after throw java. io. IOException

When I insert ; writes an error Error:(3, 19) java: cannot find symbol symbol: class io location: package java I d ... ch = (char) System.out.read(); System.out.println("Now you press " + ch + " button"); } } }

Using the MVC template in a small JavaScript + jQuery game

You need to develop a small game extension for Chrome (like minesweeper). The approximate code size is about 400 lines. What ... the functionality into a model, view, and controller and put their functionality in three different scripts. Is it worth it?

Using the sleep method()

Good afternoon, everyone. Need a tip: the program should change the label on the button sequentially from "10" to "0". To mak ... = String.valueOf(i); button.setText(iString); } } catch (InterruptedException qq) { qq.printStackTrace(); }

Simple slider in pure JavaScript

Does anyone have a simple slider in pure JavaScript? Please share it. I'm trying to make my own, but it's still a bit complic ... veLeft); function moveLeft(){ slide_left.style.display = 'block'; } Full code https://jsfiddle.net/lilubanana/srkxLkou/