{"id":379744,"date":"2024-06-25T03:41:51","date_gmt":"2024-06-25T03:41:51","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=379744"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=379744","title":{"rendered":"<span>Java \u0438 C#. \u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u0435\u043d\u0438\u044f<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/ba8\/246\/4ce\/ba82464cefa8564b83dc211c1622ce2f.jpg\" alt=\"\u0421\u043f\u0438\u0448\u0438, \u043d\u043e \u043d\u0435 \u0442\u043e\u0447\u044c \u0432 \u0442\u043e\u0447\u044c\" title=\"\u0421\u043f\u0438\u0448\u0438, \u043d\u043e \u043d\u0435 \u0442\u043e\u0447\u044c \u0432 \u0442\u043e\u0447\u044c\" width=\"602\" height=\"353\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ba8\/246\/4ce\/ba82464cefa8564b83dc211c1622ce2f.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0421\u043f\u0438\u0448\u0438, \u043d\u043e \u043d\u0435 \u0442\u043e\u0447\u044c \u0432 \u0442\u043e\u0447\u044c<\/figcaption><\/div>\n<\/figure>\n<p><strong>Disclamer: <\/strong>\u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u043f\u043e\u0437\u043d\u0430\u043d\u0438\u044f \u0432 <em>Java<\/em> \u0438\u043b\u0438 <em>C#<\/em>. \u041d\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043c\u0430. \u0415\u0441\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<h2>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430<\/h2>\n<p>1996 \u0433\u043e\u0434. <em>\u0414\u0436\u0435\u0439\u043c\u0441 \u0413\u043e\u0441\u043b\u0438\u043d\u0433<\/em> \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u044f\u0437\u044b\u043a, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0441\u0438\u043b\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 5 \u043b\u0435\u0442. \u042d\u0442\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0431\u044b\u043b <em>Java<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435. \u0418 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043b\u0435\u0442 \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u0431\u0435\u0437\u043c\u044f\u0442\u0435\u0436\u043d\u043e, \u044f\u0437\u044b\u043a \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0441\u044f, \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438  \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0440\u0435\u0448\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>\u041d\u043e \u0432\u043e\u0442 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043b\u0435\u0442\u043e 2000 \u0433\u043e\u0434\u0430. \u041f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f <em>Microsoft<\/em>. \u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b. \u042d\u0442\u0438\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c \u0431\u044b\u043b <em>.NET Framework<\/em>, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <em>C#<\/em>. <\/p>\n<p>\u0418 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043d\u0435\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 \u0441 <em>Java<\/em>. <\/p>\n<blockquote>\n<p>\u00ab<em>\u0412\u044b, \u0440\u0435\u0431\u044f\u0442\u043a\u0438 (\u0438\u0437 Microsoft), \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u044d\u0442\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 Java \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e<\/em>\u00bb<\/p>\n<p><em>\u0414\u0436\u0435\u0439\u043c\u0441 \u0413\u043e\u0441\u043b\u0438\u043d\u0433<\/em> &#8212; \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c <em>Java<\/em><\/p>\n<\/blockquote>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c C# \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u044d\u0442\u043e \u0431\u0435\u0437 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e<\/p>\n<blockquote>\n<p><em>C# <\/em>\u00ab<em>\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u043e\u043c Java<\/em>\u00bb<em> <\/em>\u0438<em> <\/em>\u00ab<em>\u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043b\u0438\u0436\u0435 \u043a C++<\/em>\u00bb \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0434\u0438\u0437\u0430\u0439\u043d\u0443<\/p>\n<p><em>\u0410\u043d\u0434\u0440\u0435\u0441 \u0425\u0435\u0439\u043b\u0441\u0431\u0435\u0440\u0433<\/em> &#8212; \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c <em>Turbo Pascal<\/em>, <em>Delphi<\/em>, <em>C#<\/em> \u0438 <em>TypeScript<\/em><\/p>\n<\/blockquote>\n<p>\u041d\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u043e\u0437\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0448\u043b\u0435\u0439\u0444 \u043a\u043b\u043e\u043d\u0430 <em>Java<\/em> \u0437\u0430 <em>C#<\/em> \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432 <em>C#<\/em> \u0431\u044b\u043b\u0438 \u044f\u0432\u043d\u043e \u00ab\u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0435\u043d\u044b\u00bb <em>Java<\/em><\/p>\n<h2>C# \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f Java<\/h2>\n<p><strong>\u041e\u041e\u041f \u043a\u0430\u043a\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430<\/strong>. \u041f\u043e\u0436\u0430\u043b\u0443\u0439 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0438\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u043c \u0432 \u0433\u043b\u0430\u0437\u0430. \u041e\u0431\u0430 \u044f\u0437\u044b\u043a\u0430  \u0438\u043c\u0435\u044e\u0442 C-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438 \u0432 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043e\u0431\u044f\u0437\u044b\u0432\u0430\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0434\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u043e\u0448\u043b\u0438 \u043c\u0435\u043c\u044b<\/p>\n<pre><code class=\"java\">\/\/ \u041a\u043b\u0430\u0441\u0441 \u043d\u0430 Java  class Person {     private int age;     private String name;      public Person(int age, String name) {         this.name = name;         this.age = age;     }      public void sayHello() {         System.out.println(\"Hello, my name is \" + name +             \"and I`m \" + age + \"years old.\");     } }<\/code><\/pre>\n<pre><code class=\"cs\">\/\/ \u041a\u043b\u0430\u0441\u0441 \u043d\u0430 C#  using System;  class Person {     private int age;     private string name;      public Person(int age, String name) {         this.name = name;         this.age = age;     }      public void sayHello() {         Console.WriteLine(\"Hello, my name is \" + name +             \"and I`m \" + age + \"years old.\");     } }<\/code><\/pre>\n<p><strong>\u0421\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430.<\/strong> \u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0434\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432 \u0434\u0438\u043a\u043e\u0432\u0438\u043d\u043a\u0443. \u0425\u043e\u0442\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f (<em>Java<\/em> &#8212; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043c\u0435\u0442\u043e\u043a, <em>C#<\/em> &#8212; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439), \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u044c \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e <em>Java<\/em> \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/6b4\/5b1\/1fe\/6b45b11feb833edb6acc8cefb0c97ebb.jpg\" alt=\"\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 Java\" title=\"\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 Java\" width=\"1600\" height=\"670\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6b4\/5b1\/1fe\/6b45b11feb833edb6acc8cefb0c97ebb.jpg\" data-blurred=\"true\"\/><\/p>\n<div><figcaption>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 <em>Java<\/em><\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/be4\/f8f\/518\/be4f8f5188c412aa719b2961052eee92.png\" alt=\"\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 C#\" title=\"\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 C#\" width=\"751\" height=\"337\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/be4\/f8f\/518\/be4f8f5188c412aa719b2961052eee92.png\"\/><\/p>\n<div><figcaption>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 <em>C#<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438. <\/strong>\u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u2014 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0435\u0449\u0435 \u0432 \u044f\u0437\u044b\u043a\u0430\u0445 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430, \u043d\u043e Java \u043f\u0440\u0438\u0432\u043d\u0435\u0441\u043b\u0430 \u0435\u0433\u043e \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0432 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0438\u043c. \u0427\u0442\u043e \u0432\u0437\u044f\u043b \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 C#<\/p>\n<pre><code class=\"java\">\/\/ \u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0432 Java  import java.lang.reflect.Method;  public class GetMethodsExample {          public static void main(String...args) {         Class&lt;GetMethodsExample> c = GetMethodsExample.class;         Method[] methods = c.getMethods();         for (Method method : methods) {             System.out.println(method);         }     }          public int calcInt(int i) {         return 0;     }          public void doSomething() {}          public static void aStaticMethod(String s) {}          private void aPrivateMethod() {} }<\/code><\/pre>\n<pre><code class=\"cs\">\/\/ \u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0432 C#  using System.Reflection;  public class GetMethodsExample {      public static void Main() {         MethodInfo[] methodInfos = Type.GetType(\"GetMethodsExample\").GetMethods();         foreach(MethodInfo methodInfo in methodInfos) {             Console.WriteLine(methodInfo.Name);         }      }      public int calcInt(int i) {         return 0;     }      public void doSomething() {}      public static void aStaticMethod(String s) {}      private void aPrivateMethod() {} }<\/code><\/pre>\n<h2>Java \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f C#<\/h2>\n<p>\u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0442\u0430\u043a \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0438 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437 <em>C#<\/em> \u043f\u0435\u0440\u0435\u0442\u0435\u043a\u043b\u0438 \u0432 <em>Java<\/em>.<\/p>\n<p><strong><em>LINQ<\/em>. <\/strong><em>Language Integrated Query<\/em> \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 <em>Microsoft<\/em> \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e <em>SQL<\/em>, \u0432 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b <em>.NET Framework<\/em>. \u0412\u043f\u0435\u0440\u0432\u044b\u0435 <em>LINQ<\/em> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 <em>C#<\/em> \u0432 2007 \u0433\u043e\u0434\u0443 \u0438 \u043b\u0438\u0448\u044c \u0441\u043f\u0443\u0441\u0442\u044f 7 \u043b\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 <em>Java<\/em> \u0432 \u0432\u0438\u0434\u0435 <em>Streams API<\/em>\u00a0<\/p>\n<pre><code class=\"cs\">\/\/ LINQ  class Program {      static void Main() {         var numbers = new List&lt;int> {1, 2, 3, 4, 5 };         var evenNumbers = numbers.Where(n => n % 2 == 0);         var squares = numbers.Select(n => n * n);         var sum = numbers.Aggregate((a, b) => a + b);     } }<\/code><\/pre>\n<pre><code class=\"java\">\/\/ Streams API  import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.stream.Stream;  public class Example {      public static void main(String[] args) {         List&lt;Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);         Stream&lt;Integer> evenNumbers = numbers.stream().filter(n -> n % 2 == 0);         Stream&lt;Integer> squares = numbers.stream().map(n -> n*n);         Optional&lt;Integer> sum = numbers.stream().reduce((a, b) -> a + b);     } }<\/code><\/pre>\n<p><strong>\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043b\u0430\u0441\u0441\u044b, \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0442. \u0434. \u041e\u043d\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 <em>C#<\/em> \u0432 2002 \u0433\u043e\u0434\u0443.\u00a0\u00a0\u0412 <em>Java<\/em> \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u043b\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438.\u00a0\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0432 <em>Java<\/em> \u0432 2004 \u0433\u043e\u0434\u0443, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0430\u0436 \u0432 2013 <\/p>\n<pre><code class=\"cs\">\/\/ \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432 C#  class Program {      [Obsolete(\"Method1 is deprecated, please use Method2 instead.\")]     public void Method() {         Console.WriteLine(\"\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\");     }      public void Method2() {         Console.WriteLine(\"\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\");     }      public static void Main() {         new Program().Method();     } }<\/code><\/pre>\n<pre><code class=\"java\">\/\/ \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432 Java  public class Program {     \/**      * @deprecated      * Method1 is deprecated, please use Method2 instead      *\/     @Deprecated     public void Method1() {         System.out.println(\"\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\");     }     public void Method2() {         System.out.println(\"\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\");     }      public static void main(String[] args) {         new Program().Method1();     } }<\/code><\/pre>\n<p><strong>\u0414\u0435\u043b\u0435\u0433\u0430\u0442\u044b. <\/strong>\u0414\u0435\u043b\u0435\u0433\u0430\u0442<strong> <\/strong>&#8212; \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u0435\u0431\u0435 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u043e\u0439 (\u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0445 \u0438 \u0442\u0438\u043f\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439) \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u041e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0432 <em>C#<\/em> \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0440\u0435\u043b\u0438\u0437\u0430. \u0412 2014 \u0433\u043e\u0434\u0443 \u0432 <em>Java<\/em> \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/p>\n<pre><code class=\"cs\">\/\/ \u0414\u0435\u043b\u0435\u0433\u0430\u0442\u044b  using System;  delegate int Adder(int a, int b);  class Program {      static void Main(string[] args) {         Adder adder = (a, b) => a + b;         int result = adder(5, 10);         Console.WriteLine(result);     } }<\/code><\/pre>\n<pre><code class=\"java\">\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b  @FunctionalInterface interface Adder {     int add(int a, int b); }  public class Main {      public static void main(String[] args) {         Adder adder = (a, b) -> a + b;          int result = adder.add(5, 10);         System.out.println(result);     } }<\/code><\/pre>\n<h2>\u0422\u0430\u043a \u043a\u0430\u043a\u043e\u0432 \u0438\u0442\u043e\u0433?<\/h2>\n<p>\u0421\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u0443\u0442\u044c \u044f\u0437\u044b\u043a\u043e\u0432 <em>Java<\/em> \u0438 <em>C#<\/em> \u044f \u043f\u0440\u0438\u0445\u043e\u0436\u0443 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u0435\u043c \u043f\u0440\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <em>C#<\/em> <em>Java<\/em> \u043f\u043e\u0442\u0435\u0440\u044f\u043b \u0441\u0432\u043e\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u0445 \u043c\u0435\u043c\u043e\u0432, \u043d\u043e  \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f. <\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u0430!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/816907\/\"> https:\/\/habr.com\/ru\/articles\/816907\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\">\n<div><figcaption>\u0421\u043f\u0438\u0448\u0438, \u043d\u043e \u043d\u0435 \u0442\u043e\u0447\u044c \u0432 \u0442\u043e\u0447\u044c<\/figcaption><\/div>\n<\/figure>\n<p><strong>Disclamer: <\/strong>\u0410\u0432\u0442\u043e\u0440 \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u0435\u0442 \u043d\u0430 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0435 \u043f\u043e\u0437\u043d\u0430\u043d\u0438\u044f \u0432 <em>Java<\/em> \u0438\u043b\u0438 <em>C#<\/em>. \u041d\u043e \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u043c\u0430. \u0415\u0441\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435 \u043d\u0435\u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u0442\u043e \u043f\u0438\u0448\u0438\u0442\u0435 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445, \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c.<\/p>\n<h2>\u041d\u0435\u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u043f\u0440\u0430\u0432\u043a\u0430<\/h2>\n<p>1996 \u0433\u043e\u0434. <em>\u0414\u0436\u0435\u0439\u043c\u0441 \u0413\u043e\u0441\u043b\u0438\u043d\u0433<\/em> \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u044e\u0442 \u044f\u0437\u044b\u043a, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0443\u0441\u0438\u043b\u0435\u043d\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 5 \u043b\u0435\u0442. \u042d\u0442\u0438\u043c \u044f\u0437\u044b\u043a\u043e\u043c \u0431\u044b\u043b <em>Java<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0448\u0438\u0440\u043e\u043a\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u0438\u0435. \u0418 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043b\u0435\u0442 \u0432\u0441\u0451 \u0431\u044b\u043b\u043e \u0431\u0435\u0437\u043c\u044f\u0442\u0435\u0436\u043d\u043e, \u044f\u0437\u044b\u043a \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0441\u044f, \u043a\u043e\u043c\u044c\u044e\u043d\u0438\u0442\u0438  \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u043b\u043e\u0441\u044c, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0440\u0435\u0448\u0430\u043b\u0438\u0441\u044c.<\/p>\n<p>\u041d\u043e \u0432\u043e\u0442 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043b\u0435\u0442\u043e 2000 \u0433\u043e\u0434\u0430. \u041f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u044f <em>Microsoft<\/em>. \u0414\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442 \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0433\u043e\u0434\u044b. \u042d\u0442\u0438\u043c \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u043c \u0431\u044b\u043b <em>.NET Framework<\/em>, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 <em>C#<\/em>. <\/p>\n<p>\u0418 \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0435\u0433\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0443 \u043c\u043d\u043e\u0433\u0438\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u043d\u0435\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 \u0441 <em>Java<\/em>. <\/p>\n<blockquote>\n<p>\u00ab<em>\u0412\u044b, \u0440\u0435\u0431\u044f\u0442\u043a\u0438 (\u0438\u0437 Microsoft), \u0432\u0441\u0435 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u044d\u0442\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 Java \u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c\u044e<\/em>\u00bb<\/p>\n<p><em>\u0414\u0436\u0435\u0439\u043c\u0441 \u0413\u043e\u0441\u043b\u0438\u043d\u0433<\/em> &#8212; \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c <em>Java<\/em><\/p>\n<\/blockquote>\n<p>\u0421\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c C# \u043d\u0435 \u043e\u0441\u0442\u0430\u0432\u0438\u043b \u044d\u0442\u043e \u0431\u0435\u0437 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043e\u0442\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e<\/p>\n<blockquote>\n<p><em>C# <\/em>\u00ab<em>\u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u043e\u043d\u043e\u043c Java<\/em>\u00bb<em> <\/em>\u0438<em> <\/em>\u00ab<em>\u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043b\u0438\u0436\u0435 \u043a C++<\/em>\u00bb \u043f\u043e \u0441\u0432\u043e\u0435\u043c\u0443 \u0434\u0438\u0437\u0430\u0439\u043d\u0443<\/p>\n<p><em>\u0410\u043d\u0434\u0440\u0435\u0441 \u0425\u0435\u0439\u043b\u0441\u0431\u0435\u0440\u0433<\/em> &#8212; \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c <em>Turbo Pascal<\/em>, <em>Delphi<\/em>, <em>C#<\/em> \u0438 <em>TypeScript<\/em><\/p>\n<\/blockquote>\n<p>\u041d\u043e \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u043e\u0437\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0448\u043b\u0435\u0439\u0444 \u043a\u043b\u043e\u043d\u0430 <em>Java<\/em> \u0437\u0430 <em>C#<\/em> \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u043e\u043d\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432 <em>C#<\/em> \u0431\u044b\u043b\u0438 \u044f\u0432\u043d\u043e \u00ab\u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u0435\u043d\u044b\u00bb <em>Java<\/em><\/p>\n<h2>C# \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f Java<\/h2>\n<p><strong>\u041e\u041e\u041f \u043a\u0430\u043a\u00a0\u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430<\/strong>. \u041f\u043e\u0436\u0430\u043b\u0443\u0439 \u044d\u0442\u043e \u043f\u0435\u0440\u0432\u043e\u0435 \u0447\u0442\u043e \u0431\u0440\u043e\u0441\u0438\u043b\u043e\u0441\u044c \u0432\u0441\u0435\u043c \u0432 \u0433\u043b\u0430\u0437\u0430. \u041e\u0431\u0430 \u044f\u0437\u044b\u043a\u0430  \u0438\u043c\u0435\u044e\u0442 C-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438 \u0432 \u043f\u0435\u0440\u0432\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u043e\u0431\u044f\u0437\u044b\u0432\u0430\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432. \u041f\u0440\u043e\u0441\u0442\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u0435 \u0434\u0432\u0430 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u0430 \u0438 \u0441\u0442\u0430\u043d\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u043e\u0442\u043a\u0443\u0434\u0430 \u043f\u043e\u0448\u043b\u0438 \u043c\u0435\u043c\u044b<\/p>\n<pre><code class=\"java\">\/\/ \u041a\u043b\u0430\u0441\u0441 \u043d\u0430 Java  class Person {     private int age;     private String name;      public Person(int age, String name) {         this.name = name;         this.age = age;     }      public void sayHello() {         System.out.println(\"Hello, my name is \" + name +             \"and I`m \" + age + \"years old.\");     } }<\/code><\/pre>\n<pre><code class=\"cs\">\/\/ \u041a\u043b\u0430\u0441\u0441 \u043d\u0430 C#  using System;  class Person {     private int age;     private string name;      public Person(int age, String name) {         this.name = name;         this.age = age;     }      public void sayHello() {         Console.WriteLine(\"Hello, my name is \" + name +             \"and I`m \" + age + \"years old.\");     } }<\/code><\/pre>\n<p><strong>\u0421\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430.<\/strong> \u041d\u0430 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0434\u043e\u0432\u0430\u044f \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430 \u0441\u043a\u043e\u0440\u0435\u0435 \u0432 \u0434\u0438\u043a\u043e\u0432\u0438\u043d\u043a\u0443. \u0425\u043e\u0442\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u044f\u0437\u044b\u043a\u0430\u0445 \u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f (<em>Java<\/em> &#8212; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043c\u0435\u0442\u043e\u043a, <em>C#<\/em> &#8212; \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043a\u043e\u043b\u0435\u043d\u0438\u0439), \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u044c \u0447\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e <em>Java<\/em> \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u044d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 <em>Java<\/em><\/figcaption><\/div>\n<\/figure>\n<figure class=\"full-width\">\n<div><figcaption>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u0443\u0441\u043e\u0440\u0430 \u0432 <em>C#<\/em><\/figcaption><\/div>\n<\/figure>\n<p><strong>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0440\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438. <\/strong>\u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u044f \u2014 \u044d\u0442\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0435\u0451 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u042d\u0442\u043e\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0432 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0435\u0449\u0435 \u0432 \u044f\u0437\u044b\u043a\u0430\u0445 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430, \u043d\u043e Java \u043f\u0440\u0438\u0432\u043d\u0435\u0441\u043b\u0430 \u0435\u0433\u043e \u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0435 \u044f\u0437\u044b\u043a\u0438, \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0432 \u043f\u043e\u0434\u0445\u043e\u0434 \u043a \u043d\u0438\u043c. \u0427\u0442\u043e \u0432\u0437\u044f\u043b \u043d\u0430 \u0432\u043e\u043e\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 C#<\/p>\n<pre><code class=\"java\">\/\/ \u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0432 Java  import java.lang.reflect.Method;  public class GetMethodsExample {          public static void main(String...args) {         Class&lt;GetMethodsExample> c = GetMethodsExample.class;         Method[] methods = c.getMethods();         for (Method method : methods) {             System.out.println(method);         }     }          public int calcInt(int i) {         return 0;     }          public void doSomething() {}          public static void aStaticMethod(String s) {}          private void aPrivateMethod() {} }<\/code><\/pre>\n<pre><code class=\"cs\">\/\/ \u0420\u0435\u0444\u043b\u0435\u043a\u0441\u0438\u0438 \u0432 C#  using System.Reflection;  public class GetMethodsExample {      public static void Main() {         MethodInfo[] methodInfos = Type.GetType(\"GetMethodsExample\").GetMethods();         foreach(MethodInfo methodInfo in methodInfos) {             Console.WriteLine(methodInfo.Name);         }      }      public int calcInt(int i) {         return 0;     }      public void doSomething() {}      public static void aStaticMethod(String s) {}      private void aPrivateMethod() {} }<\/code><\/pre>\n<h2>Java \u0432\u0434\u043e\u0445\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f C#<\/h2>\n<p>\u041d\u043e \u043d\u0435 \u0432\u0441\u0435 \u0442\u0430\u043a \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0438 \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0437 <em>C#<\/em> \u043f\u0435\u0440\u0435\u0442\u0435\u043a\u043b\u0438 \u0432 <em>Java<\/em>.<\/p>\n<p><strong><em>LINQ<\/em>. <\/strong><em>Language Integrated Query<\/em> \u2014 \u043f\u0440\u043e\u0435\u043a\u0442 <em>Microsoft<\/em> \u043f\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u044f\u0437\u044b\u043a\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e <em>SQL<\/em>, \u0432 \u044f\u0437\u044b\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b <em>.NET Framework<\/em>. \u0412\u043f\u0435\u0440\u0432\u044b\u0435 <em>LINQ<\/em> \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 <em>C#<\/em> \u0432 2007 \u0433\u043e\u0434\u0443 \u0438 \u043b\u0438\u0448\u044c \u0441\u043f\u0443\u0441\u0442\u044f 7 \u043b\u0435\u0442 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 <em>Java<\/em> \u0432 \u0432\u0438\u0434\u0435 <em>Streams API<\/em>\u00a0<\/p>\n<pre><code class=\"cs\">\/\/ LINQ  class Program {      static void Main() {         var numbers = new List&lt;int> {1, 2, 3, 4, 5 };         var evenNumbers = numbers.Where(n => n % 2 == 0);         var squares = numbers.Select(n => n * n);         var sum = numbers.Aggregate((a, b) => a + b);     } }<\/code><\/pre>\n<pre><code class=\"java\">\/\/ Streams API  import java.util.Arrays; import java.util.List; import java.util.Optional; import java.util.stream.Stream;  public class Example {      public static void main(String[] args) {         List&lt;Integer> numbers = Arrays.asList(1, 2, 3, 4, 5);         Stream&lt;Integer> evenNumbers = numbers.stream().filter(n -> n % 2 == 0);         Stream&lt;Integer> squares = numbers.stream().map(n -> n*n);         Optional&lt;Integer> sum = numbers.stream().reduce((a, b) -> a + b);     } }<\/code><\/pre>\n<p><strong>\u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u043e\u043c\u0435\u0447\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430, \u043a\u043b\u0430\u0441\u0441\u044b, \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0442. \u0434. \u041e\u043d\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c \u0432 <em>C#<\/em> \u0432 2002 \u0433\u043e\u0434\u0443.\u00a0\u00a0\u0412 <em>Java<\/em> \u0442\u0430\u043a\u0430\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0431\u044b\u043b\u0430 \u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f\u043c\u0438.\u00a0\u041d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0432 <em>Java<\/em> \u0432 2004 \u0433\u043e\u0434\u0443, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0439 \u0441 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u044f\u043c\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0430\u0436 \u0432 2013 <\/p>\n<pre><code class=\"cs\">\/\/ \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432 C#  class Program {      [Obsolete(\"Method1 is deprecated, please use Method2 instead.\")]     public void Method() {         Console.WriteLine(\"\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\");     }      public void Method2() {         Console.WriteLine(\"\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\");     }      public static void Main() {         new Program().Method();     } }<\/code><\/pre>\n<pre><code class=\"java\">\/\/ \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0432 Java  public class Program {     \/**      * @deprecated      * Method1 is deprecated, please use Method2 instead      *\/     @Deprecated     public void Method1() {         System.out.println(\"\u0423\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u043c\u0435\u0442\u043e\u0434\");     }     public void Method2() {         System.out.println(\"\u0410\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434\");     }      public static void main(String[] args) {         new Program().Method1();     } }<\/code><\/pre>\n<p><strong>\u0414\u0435\u043b\u0435\u0433\u0430\u0442\u044b. <\/strong>\u0414\u0435\u043b\u0435\u0433\u0430\u0442<strong> <\/strong>&#8212; \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0432 \u0441\u0435\u0431\u0435 \u0441\u0441\u044b\u043b\u043a\u0443 \u043d\u0430 \u043c\u0435\u0442\u043e\u0434 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0439 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u043e\u0439 (\u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u0438 \u0442\u0438\u043f\u0430\u043c\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0445 \u0438 \u0442\u0438\u043f\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439) \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u041e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0432 <em>C#<\/em> \u0441 \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0440\u0435\u043b\u0438\u0437\u0430. \u0412 2014 \u0433\u043e\u0434\u0443 \u0432 <em>Java<\/em> \u0431\u044b\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u044b \u0432 \u0432\u0438\u0434\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u0432<\/p>\n<pre><code class=\"cs\">\/\/ \u0414\u0435\u043b\u0435\u0433\u0430\u0442\u044b  using System;  delegate int Adder(int a, int b);  class Program {      static void Main(string[] args) {         Adder adder = (a, b) => a + b;         int result = adder(5, 10);         Console.WriteLine(result);     } }<\/code><\/pre>\n<pre><code class=\"java\">\/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044b  @FunctionalInterface interface Adder {     int add(int a, int b); }  public class Main {      public static void main(String[] args) {         Adder adder = (a, b) -> a + b;          int result = adder.add(5, 10);         System.out.println(result);     } }<\/code><\/pre>\n<h2>\u0422\u0430\u043a \u043a\u0430\u043a\u043e\u0432 \u0438\u0442\u043e\u0433?<\/h2>\n<p>\u0421\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u043f\u0443\u0442\u044c \u044f\u0437\u044b\u043a\u043e\u0432 <em>Java<\/em> \u0438 <em>C#<\/em> \u044f \u043f\u0440\u0438\u0445\u043e\u0436\u0443 \u043a \u0432\u044b\u0432\u043e\u0434\u0443, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043c\u0435\u043c \u043f\u0440\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 <em>C#<\/em> <em>Java<\/em> \u043f\u043e\u0442\u0435\u0440\u044f\u043b \u0441\u0432\u043e\u044e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0440\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442\u0441\u043a\u0438\u0445 \u043c\u0435\u043c\u043e\u0432, \u043d\u043e  \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u0440\u0443\u0433\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f. <\/p>\n<p>\u0412\u0441\u0435\u043c \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u0430!<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/816907\/\"> https:\/\/habr.com\/ru\/articles\/816907\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-379744","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/379744","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=379744"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/379744\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=379744"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=379744"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=379744"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}