This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner scan = new Scanner(System.in); | |
| System.out.println("Введіть розмірність масиву m*n:"); | |
| int m = scan.nextInt(); | |
| int n = scan.nextInt(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner scan = new Scanner(System.in); | |
| int n = scan.nextInt(); | |
| int sum = 0; | |
| for(int i=0;i<=n;i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| public class Main { | |
| public static void main(String args[]){ | |
| int i, j, a=0; | |
| for(i = 1; i < 10; i++){ | |
| for(j = 1; j < 10; j++) { | |
| a = i*j; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class App { | |
| public statioc void main() { | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ImageDownloadTask implements Runnable { | |
| private URL imageURL; | |
| public void run() { | |
| for(int i = 0; i < 3; i++) { | |
| if(isImageDownloaded()) break; // return | |
| } | |
| } | |
| private boolean isImageDownloaded() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.w3c.dom.Document; | |
| import org.w3c.dom.Element; | |
| import org.w3c.dom.NodeList; | |
| import org.xml.sax.SAXException; | |
| import javax.xml.parsers.DocumentBuilder; | |
| import javax.xml.parsers.DocumentBuilderFactory; | |
| import javax.xml.parsers.ParserConfigurationException; | |
| import javax.xml.transform.Transformer; | |
| import javax.xml.transform.TransformerException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| public class App { | |
| public static void main(String[] args) { | |
| ArrayList<String> cities = new ArrayList<>(); | |
| //Start | |
| boolean isFound = false; | |
| for (String city : cities) { | |
| if (city.equals("Monte")) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Box { | |
| public void drop() { | |
| System.out.println("Bom"); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| public class Task2 { | |
| public static void main(String[] args) throws IOException { | |
| File file = new File("D:/test-java.txt"); | |
| file.createNewFile(); | |
| FileOutputStream outputStream = new FileOutputStream(file); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| public class Task1 { | |
| public static void main(String[] args) throws IOException { | |
| File file = new File("D:/test-java.txt"); | |
| file.createNewFile(); | |
| FileOutputStream outputStream = new FileOutputStream(file); |