<!DOCTYPE html>
<html class="h-100" data-bs-theme="light" data-mantine-color-scheme="light" lang="ru" prefix="og: https://ogp.me/ns#">
<head>
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<link crossorigin="true" href="https://cdn.hexlet.io" rel="preconnect">
<link href="https://mc.yandex.ru" rel="preconnect">
<meta content="aa2vrdtq64dub8knuf83lwywit311w" name="facebook-domain-verification">
<link href="/favicon.ico" rel="icon" sizes="any">
<link href="/favicon.svg" rel="icon" type="image/svg+xml">
<link href="/apple-touch-icon.png" rel="apple-touch-icon">
<link href="/manifest.webmanifest" rel="manifest">
<script>
//<![CDATA[
window.gon={};gon.ym_counter="25559621";gon.is_bot=true;gon.applications={};gon.current_user={"id":null,"last_viewed_notification_id":null,"email":null,"state":null,"first_name":"","last_name":"","created_at":"2026-02-26 19:05:14 UTC","current_program":null,"current_team":null,"full_name":"","guest":true,"can_use_paid_features":false,"is_hexlet_employee":false,"sanitized_phone_number":"","can_subscribe":true,"can_renew_education":false};gon.token="d2yAjUr3Xm-AeS2OHvSOj2Uk67seYjXnFRkGmT96EXuYvUu6uInzDzY6CRYS-374pS3GERZVy0Wo-ZzNbX32FQ";gon.locale="ru";gon.language="ru";gon.theme="light";gon.rails_env="production";gon.mobile=false;gon.google={"analytics_key":"UA-1360700-51","optimize_key":"GTM-5QDVFPF"};gon.captcha={"google_v3_site_key":"6LenGbgZAAAAAM7HbrDbn5JlizCSzPcS767c9vaY","yandex_site_key":"ysc1_Vyob5ZPPUdPBsu0ykt8bVFdzsfpoVjQChLGl2b4g19647a89","verification_failed":null};gon.social_signin=false;gon.typoreporter_google_form_id="1FAIpQLSeibfGq-KvWQ2Fyru-zkFFRVTLBuzXAHAoEyN1p49FtDmNoNA";
//]]>
</script>
<meta charset="utf-8">
<title>Как получить символ из строки java? — Q&A Хекслет</title>
<meta name="description" content="25 ответов — Как получить символ из строки java? — Q&A Хекслет">
<link rel="canonical" href="https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java">
<meta property="og:description" content="25 ответов
— Как получить символ из строки java? — Q&A Хекслет">
<meta property="og:title" content="Как получить символ из строки java? — Q&A Хекслет">
<meta property="og:url" content="https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java">
<meta name="csrf-param" content="authenticity_token" />
<meta name="csrf-token" content="M1naLAqZmtsM5CpmUWz5l1HSHJ8mfqd1kgJlgcRSOh3ciBEb-Oc3u7qnDv5dYwngkdsxNS5JWdcv4v_VllXdcw" />
<script src="/vite/assets/inertia-DfXos102.js" crossorigin="anonymous" type="module"></script><link rel="modulepreload" href="/vite/assets/chunk-DsPFFUou.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/preload-helper-BJ4cLWpC.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/init-BrRXra1y.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/ahoy-DrlRQ-1D.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/analytics-cb8xch9l.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/ErrorFallbackBlock-naDSYSy9.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Surface-DL2bpZA-.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/gon-D3e4yh1x.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/mantine-CGMYrt2Y.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/utils-DRqSHbQE.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/routes-CCH8ilKF.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/extends-C-EagtpE.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/inheritsLoose-BBd-DCVI.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/objectWithoutPropertiesLoose-DRHXDhjp.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/index.esm-DAqKOkZ0.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Button-CGPUux8l.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/CloseButton-D1euiPao.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Group-BX48WcuU.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Loader-BQEY8g6v.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Modal-Cy3HByv7.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/OptionalPortal-1Hza5P2w.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Stack-CtjJzfw4.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Textarea-Ck64llAy.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Box-B5-OOzBf.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/DirectionProvider-Dc9zdUke.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/events-DJQOhap0.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/use-reduced-motion-D2owz4wa.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/use-disclosure-zKtK5W1r.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/use-hotkeys-Cnc_Rwkb.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/random-id-DOQyszCZ.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/notifications.store-C-3AFSMn.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/exports-C_MrNx_T.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/axios-BEvgo0ym.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/dayjs.min-BkKovM-s.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/i18next-BlSq9s7B.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/client-U9M77rxp.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/react-dom-DaLxUz_h.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/useTranslation-Bx1Cdrkz.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/compiler-runtime-6XxiPFnt.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/jsx-runtime-CwjcCKJi.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/react-CkL4ZRHB.js" as="script" crossorigin="anonymous">
<link rel="stylesheet" href="/vite/assets/application-BqhCP46M.js" />
<script src="/vite/assets/application-Df9RExpe.js" crossorigin="anonymous" type="module"></script><link rel="modulepreload" href="/vite/assets/chunk-DsPFFUou.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/autocomplete-VMNbxKGl.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/routes-CCH8ilKF.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/createPopper-C3aM9r1M.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/js.cookie-D1-O8zkX.js" as="script" crossorigin="anonymous"><link rel="stylesheet" href="/vite/assets/application-C8HjmMaq.css" media="screen" />
<script>
window.ym = function(){(ym.a=ym.a||[]).push(arguments)};
window.addEventListener('load', function() {
setTimeout(function() {
ym.l = 1*new Date();
ym(window.gon.ym_counter, "init", {
clickmap: true,
trackLinks: true,
accurateTrackBounce: true,
webvisor: true
});
// Загружаем скрипт
var k = document.createElement('script');
k.async = 1;
k.src = 'https://mc.yandex.ru/metrika/tag.js';
document.head.appendChild(k);
ym(window.gon.ym_counter, 'getClientID', function(clientID) {
window.ymClientId = clientID;
});
}, 1500);
});
</script>
<!-- Google Tag Manager - deferred -->
<script>
// dataLayer stub сразу — пуши работают до загрузки скрипта
window.dataLayer = window.dataLayer || [];
// Сам скрипт — отложенно после load
window.addEventListener('load', function() {
setTimeout(function() {
dataLayer.push({'gtm.start': new Date().getTime(), event: 'gtm.js'});
var j = document.createElement('script');
j.async = true;
j.src = 'https://www.googletagmanager.com/gtm.js?id=GTM-WK88TH';
document.head.appendChild(j);
}, 1500);
});
</script>
<!-- End Google Tag Manager -->
</head>
<body>
<noscript>
<div>
<img alt="" src="https://mc.yandex.ru/watch/25559621" style="position:absolute; left:-9999px;">
</div>
</noscript>
<header class="sticky-top bg-body">
<nav class="navbar navbar-expand-lg">
<div class="container-xxl">
<a class="navbar-brand" href="/"><img alt="Логотип Хекслета" height="24" src="https://ru.hexlet.io/vite/assets/logo_ru_light-BpiEA1LT.svg" width="96">
</a><button aria-controls="collapsable" aria-expanded="false" aria-label="Меню" class="navbar-toggler border-0 mb-0 mt-1" data-bs-target="#collapsable" data-bs-toggle="collapse">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsable">
<ul class="navbar-nav mb-lg-0 mt-lg-1">
<li class="nav-item dropdown">
<button aria-haspopup class="btn nav-link" data-bs-toggle="dropdown" type="button">
Все курсы
<span class="bi bi-chevron-down align-middle ms-1"></span>
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item d-flex py-2" href="/courses"><div class="fw-bold me-auto">Все что есть</div>
<div class="text-muted">117</div>
</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li class="dropdown-item">
<b>Популярные категории</b>
</li>
<li>
<a class="dropdown-item py-2" href="/courses_devops">Курсы по DevOps
</a></li>
<li>
<a class="dropdown-item py-2" href="/courses_data_analytics">Курсы по аналитике данных
</a></li>
<li>
<a class="dropdown-item py-2" href="/courses_programming">Курсы по программированию
</a></li>
<li>
<a class="dropdown-item py-2" href="/courses_testing">Курсы по тестированию
</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li class="dropdown-item">
<b>Популярные курсы</b>
</li>
<li>
<a class="dropdown-item py-2" href="/programs/devops-engineer-from-scratch">DevOps-инженер с нуля
</a></li>
<li>
<a class="dropdown-item py-2" href="/programs/go">Go-разработчик
</a></li>
<li>
<a class="dropdown-item py-2" href="/programs/java">Java-разработчик
</a></li>
<li>
<a class="dropdown-item py-2" href="/programs/python">Python-разработчик
</a></li>
<li>
<a class="dropdown-item py-2" href="/programs/qa-auto-engineer-java">Автоматизатор тестирования на Java
</a></li>
<li>
<a class="dropdown-item py-2" href="/programs/data-analytics">Аналитик данных
</a></li>
<li>
<a class="dropdown-item py-2" href="/programs/frontend">Фронтенд-разработчик
</a></li>
</ul>
</li>
<li class="nav-item dropdown">
<button aria-haspopup class="btn nav-link" data-bs-toggle="dropdown" type="button">
О Хекслете
<span class="bi bi-chevron-down align-middle"></span>
</button>
<ul class="dropdown-menu bg-body">
<li>
<a class="dropdown-item py-2" href="/pages/about">О нас
</a></li>
<li>
<a class="dropdown-item py-2" href="/blog">Блог
</a></li>
<li>
<span class="dropdown-item py-2 external-link" data-href="https://special.hexlet.io/hse-research" role="button">Результаты (Исследование)
</span></li>
<li>
<span class="dropdown-item py-2 external-link" data-href="https://career.hexlet.io" role="button">Хекслет Карьера
</span></li>
<li>
<a class="dropdown-item py-2" href="/testimonials">Отзывы студентов
</a></li>
<li>
<span class="dropdown-item py-2 external-link" data-href="https://t.me/hexlet_help_bot" role="button">Поддержка (В ТГ)
</span></li>
<li>
<span class="dropdown-item py-2 external-link" data-href="https://special.hexlet.io/referal-program/?promo_creative=priglasite-druzei&promo_name=referal-program&promo_position=promo_position&promo_start=010724&promo_type=link" role="button">Реферальная программа
</span></li>
<li>
<span class="dropdown-item py-2 external-link" data-href="https://special.hexlet.io/certificate" role="button">Подарочные сертификаты
</span></li>
<li>
<span class="dropdown-item py-2 external-link" data-href="https://hh.ru/employer/4307094" role="button">Вакансии
</span></li>
<li>
<span class="dropdown-item d-flex external-link" rel="noopener noreferrer nofollow" data-href="https://b2b.hexlet.io" data-target="_blank" role="button">Компаниям
</span></li>
<li>
<span class="dropdown-item d-flex external-link" rel="noopener noreferrer nofollow" data-href="https://hexly.ru/" data-target="_blank" role="button">Колледж
</span></li>
<li>
<span class="dropdown-item d-flex external-link" rel="noopener noreferrer nofollow" data-href="https://hexlyschool.ru/" data-target="_blank" role="button">Частная школа
</span></li>
</ul>
</li>
<li><a class="nav-link" href="/subscription/new">Подписка</a></li>
</ul>
<ul class="navbar-nav flex-lg-row align-items-lg-center gap-2 ms-auto">
<li>
<a class="nav-link" aria-label="Переключить тему" href="/theme/switch?new_theme=dark"><span aria-hidden="true" class="bi bi-moon"></span>
</a></li>
<li>
<span data-target="_self" class="nav-link external-link" data-href="/u/new" role="button"><span>Регистрация</span>
</span></li>
<li>
<span data-target="_self" class="nav-link external-link" data-href="https://ru.hexlet.io/session/new" role="button"><span>Вход</span>
</span></li>
</ul>
</div>
</div>
</nav>
</header>
<div class="x-container-xxxl">
</div>
<main class="mb-6 min-vh-100 h-100">
<link rel="preload" as="image" href="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzczNSwicHVyIjoiYmxvYl9pZCJ9fQ==--883f3fd4e1b571538035b5680c8d4a9eb504b1f6/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Source%20code-amico.png"/><link rel="preload" as="image" href="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NDAxNiwicHVyIjoiYmxvYl9pZCJ9fQ==--eb66b9b5e26fafa32844ce0f4522c3ed84544040/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Hand%20coding-rafiki.png"/><link rel="preload" as="image" href="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzY3MSwicHVyIjoiYmxvYl9pZCJ9fQ==--ca5a6047d43e5c0f6d07b52e845817fa2c47ef02/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20typing-bro.png"/><link rel="preload" as="image" href="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzY3NSwicHVyIjoiYmxvYl9pZCJ9fQ==--b3b44cb29727c1bcb0b9aee0c285371dc12aa50f/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20typing-pana.png"/><link rel="preload" as="image" href="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NDAxMywicHVyIjoiYmxvYl9pZCJ9fQ==--2d7c85c58ffeed73b7a953a01db194b8932851d2/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20snippets-cuate.png"/><link rel="preload" as="image" href="/vite/assets/development-BVihs_d5.png"/><div id="app" data-page="{"component":"web/qna/questions/show","props":{"errors":{},"locale":"ru","language":"ru","httpsHost":"https://ru.hexlet.io","host":"ru.hexlet.io","colorScheme":"light","auth":{"user":{"id":null,"last_viewed_notification_id":null,"email":null,"state":null,"first_name":"","last_name":"","created_at":"2026-02-26T19:05:14.057Z","current_program":null,"current_team":null,"full_name":"","guest":true,"can_use_paid_features":false,"is_hexlet_employee":false,"sanitized_phone_number":"","can_subscribe":true,"can_renew_education":false}},"cloudflareTurnstileSiteKey":"0x4AAAAAAA15KmeFXzd2H0Xo","vkIdClientId":"51586979","yandexIdClientId":"88d071f1d3384eb4bd1deb37910235c7","formAuthToken":"wNCCN5wg0GeVA5BSa1q9e4x-yIqDGTLcb6BAf4qGIe8vAUkAbl59ByNAtMpnVU0MTHflIIsuzH7SQNor2IHGgQ","category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"mainStackCategory":{"id":2,"name":"Курсы по веб-разработке","slug":"web_development","short_name":"Веб-разработка","order":190,"state":"published","category_slug":"courses_web_development"},"answerDto":{"id":null,"body":"","meta":{"model":"question_answer","relations":{}}},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"answers":[{"user":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":14,"state":"active","body":"Для извлечения символа из строки используется метод `charAt()`. Он принимает на вход позицию (индекс) по которому находится нужный символ. Отсчет индексов начинается с нуля. То есть первый символ имеет нулевой индекс, первый – второй и так далее.\r\n\r\n```java\r\n\"wow\".charAt(1); // 'o'\r\n\r\nvar company = \"Hexlet\";\r\n\r\ncompany.charAt(0); // 'H'\r\ncompany.charAt(3); // 'l'\r\n```\r\n\r\nЕсли выйти за границу доступных букв, то возникнет ошибка:\r\n\r\n```java\r\ncompany.charAt(-1); // Error: String index out of range: -1\r\n\r\ncompany.charAt(10); // Error: cannot find symbol\r\n\r\n```","votes_up_count":29,"votes_down_count":1,"created_at":"2021-10-21T21:18:30.065Z","user_id":1,"category_slug":"java"},{"user":{"id":640097,"email":"olgaveber860@gmail.com","first_name":"Ольга","last_name":"Вебер","telegram":null,"full_name":"Ольга Вебер","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":2931,"state":"active","body":"Упражнение 10. Мой вариант:)\r\n\r\n\r\n var text = \"Never forget what you are, for surely the world will not\";\r\n System.out.println(\"First: \" + text.charAt(0) + \"\\nLast: \" + text.charAt(text.length() -1));","votes_up_count":25,"votes_down_count":6,"created_at":"2023-06-30T13:28:05.127Z","user_id":640097,"category_slug":"java"},{"user":{"id":414553,"email":"ilyas-sbrf@mail.ru","first_name":"Ильяс","last_name":null,"telegram":null,"full_name":"Ильяс","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":1671,"state":"active","body":"Добрый день! А в скобки в charAt можно занести какую-нибудь информацию, что бы она вывела мне последний символ, что бы мне не приходилось сидеть и считать буквы?","votes_up_count":13,"votes_down_count":0,"created_at":"2023-02-03T13:35:16.016Z","user_id":414553,"category_slug":"java"},{"user":{"id":583565,"email":"nonamewebsystem@gmail.com","first_name":"","last_name":"","telegram":"","full_name":"","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":1697,"state":"active","body":"\r\nМетодом length считаем общее количество символов и вычитаем 1, так как считаем с 0. Это и будет индекс последнего символа.\r\n","votes_up_count":9,"votes_down_count":0,"created_at":"2023-02-09T14:59:57.207Z","user_id":583565,"category_slug":"java"},{"user":{"id":645291,"email":"aleksandr.s.serov@gmail.com","first_name":"Aleksandr","last_name":"","telegram":"","full_name":"Aleksandr","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":2927,"state":"active","body":"к упражнению 10 \r\n1. Методом length считаем общее количество символов\r\n2. Методом charAt(...) находится значение первого и последнего символа\r\n3. Методом \\n создается перенос строки\r\n4. Не забываем про пробелы в выводе результатов.","votes_up_count":6,"votes_down_count":2,"created_at":"2023-06-25T16:04:59.963Z","user_id":645291,"category_slug":"java"},{"user":{"id":730872,"email":"grabster.dodster1520@mail.ru","first_name":"Егвений","last_name":"Жуков","telegram":"","full_name":"Егвений Жуков","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":3340,"state":"active","body":"В этой ветке все активно обсуждают задание номер 10. Поэтому я тоже хочу!\r\nДля начала хочется заметить, что это задание вызвало у меня существенный ступор. Хотя я уже проходил его на CodeBasics, будучи никем в программировании это решение быстро превратилось в \"кашу\" у меня в голове и забылось. \r\nНаверное потому, что у меня до этого задания был \"барьер\" в голове, о том, могу ли я делать конкатенацию с методом или тварь я дрожащая. Ну и ко всему прочему, меня пугали длинные выражения.\r\n\r\nТеперь я знаю, я буду конкатенировать всё, что мне попадёт под руку, может даже сделаю КОДоПСА.\r\n\r\nМоё решение задания номер 10:\r\n-----------------------------------------------------------------------------\r\nvar text = \"Never forget what you are, for surely the world will not\";\r\n\r\nvar a = \"First: \" + text.charAt(0) + \"\\nLast: \" + text.charAt(55);\r\n\r\nSystem.out.println(a);\r\n","votes_up_count":2,"votes_down_count":3,"created_at":"2023-12-28T08:53:39.101Z","user_id":730872,"category_slug":"java"},{"user":{"id":729613,"email":"l208@bk.ru","first_name":"Сергей","last_name":null,"telegram":null,"full_name":"Сергей","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":3323,"state":"active","body":"Просто надо привыкнуть, что Java рождался из C языков. Там все массивы с 0))) Строки - это тож массивы(точнее не массивы а ссылки). Тем кто начинал с Basic или Pascal сложнее, там со строками проще иногда. ","votes_up_count":2,"votes_down_count":0,"created_at":"2023-11-23T11:30:54.489Z","user_id":729613,"category_slug":"java"},{"user":{"id":834236,"email":"xformer@bk.ru","first_name":"Xformer","last_name":null,"telegram":null,"full_name":"Xformer","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":3823,"state":"active","body":"System.out.println(\"First: \" + text.charAt(0) + \"\\nLast: \" + text.charAt(text.length()-1));","votes_up_count":2,"votes_down_count":0,"created_at":"2024-06-06T03:36:52.957Z","user_id":834236,"category_slug":"java"},{"user":{"id":729418,"email":"kost.petroff@ya.ru","first_name":"Константин ","last_name":"Петров ","telegram":"","full_name":"Константин Петров","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":3322,"state":"active","body":"var text = \"Never forget what you are, for surely the world will not\";\r\n\r\n \r\n var text2 = \"not\";\r\n System.out.println(\"First: \"+ text.charAt(0)+\"\\nLast: \"+ text2.charAt(2));","votes_up_count":1,"votes_down_count":3,"created_at":"2023-11-23T08:49:54.767Z","user_id":729418,"category_slug":"java"},{"user":{"id":693456,"email":"gggggggggggggggg2308@rambler.ru","first_name":null,"last_name":null,"telegram":null,"full_name":"","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":2976,"state":"active","body":"System.out.println(\"First: \"+text.charAt(0)+\"\\nLast: \"+text.charAt(55));","votes_up_count":1,"votes_down_count":4,"created_at":"2023-09-20T06:30:06.335Z","user_id":693456,"category_slug":"java"},{"user":{"id":977362,"email":"bint1k693@gmail.com","first_name":"Bint","last_name":null,"telegram":null,"full_name":"Bint","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":5023,"state":"active","body":"Упражнение 10 мой ответ: \r\n\r\n# var text = \"Never forget what you are, for surely the world will not\";\r\n\r\n\r\n var textFLSymbols = \"First: \" + text.charAt(0) + \"\\nLast: \" + text.charAt(text.length() - 1);\r\n System.out.println(textFLSimbols);\r\n\r\nне один из ваших вариантов не является верным так как в условии задания написано, что вы должны добавить переменную и уже ее засунуть в System.out.println","votes_up_count":0,"votes_down_count":0,"created_at":"2025-07-14T09:27:12.173Z","user_id":977362,"category_slug":"java"},{"user":{"id":937846,"email":"mcmixer88@mail.ru","first_name":"Эдгар","last_name":null,"telegram":null,"full_name":"Эдгар","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":4684,"state":"active","body":"Мой вариант 10-го задания с использованием полученных знаний на Hexlet:\r\nSystem.out.println(\"First: \" + text.charAt(0) + \"\\n\" + \"Last: \" + text.charAt(text.length() - 1));","votes_up_count":0,"votes_down_count":0,"created_at":"2025-02-10T15:01:22.761Z","user_id":937846,"category_slug":"java"},{"user":{"id":255627,"email":"ajaks13@bk.ru","first_name":"Andrey","last_name":"","telegram":"","full_name":"Andrey","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":4505,"state":"active","body":"В задании написано, что нужно создать только одну переменную и записать в нее все выражение ДО вывода на экран!\r\nПоэтому создаем переменную и записываем в нее составное выражение с конкатенацией строк с методами и символом переноса строки. Чтобы получить последний символ, нужно в атрибут метода получения символа вместо индекса вставить метод подсчета количества символов и вычесть 1 (так как индекс считается от 0).","votes_up_count":0,"votes_down_count":0,"created_at":"2024-11-23T20:29:03.446Z","user_id":255627,"category_slug":"java"},{"user":{"id":985012,"email":"ombreosv@gmail.com","first_name":"Core","last_name":null,"telegram":null,"full_name":"Core","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":5061,"state":"active","body":"Интересный факто. Все \"правильные\" решения с text.charAt(text.lenght() -1) - заслуга Чата GPT. \r\nИ лишь те немногие с text.charAt(55) сами решили. Хоть это решение не верно и малофункционально. Ибо невозможно додуматся до конструкции где вместо вызываемой буквы, в методе, мы засовываем еще один метод. Ибо это даже приблизительно нигде не упоминалось.\r\nА так... \"пройти\" задачу можно было элементарным System.out.println(\"First: N\" + \"\\nLast: t\"); что просто глупый ответ на глупый вопрос. Только если у вопроса не было задачи стимулировать искать ответ в интернете.","votes_up_count":0,"votes_down_count":0,"created_at":"2025-08-19T16:33:46.612Z","user_id":985012,"category_slug":"java"},{"user":{"id":802644,"email":"bazhanov1995@mail.ru","first_name":"Сергей ","last_name":"Бажанов","telegram":null,"full_name":"Сергей Бажанов","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":3484,"state":"active","body":"var text = \"Never forget what you are, for surely the world will not\";\r\n var t1 = text.charAt(0);\r\n var t2 = text.charAt(55);\r\n System.out.println (\"First: \"+t1+\"\\nLast: \"+t2);","votes_up_count":0,"votes_down_count":1,"created_at":"2024-04-03T09:42:43.242Z","user_id":802644,"category_slug":"java"},{"user":{"id":964607,"email":"jaikaz@yandex.ru","first_name":"Александр","last_name":"Никифоров","telegram":null,"full_name":"Александр Никифоров","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":4985,"state":"active","body":" var text = \"Never forget what you are, for surely the world will not\";\r\n\r\n var result = \"First: \" + text.charAt(0) + \"\\nLast: \" + text.charAt(text.length() - 1);\r\n System.out.println(result);","votes_up_count":0,"votes_down_count":0,"created_at":"2025-05-14T02:32:42.997Z","user_id":964607,"category_slug":"java"},{"user":{"id":1006480,"email":"pbedrov@gmail.com","first_name":"Павел","last_name":"Бедрев","telegram":"BedrPavel","full_name":"Павел Бедрев","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":5435,"state":"active","body":"var result = \"First: \" + text.charAt(0) + \"\\nLast: \" + text.charAt(text.length() - 1);\nSystem.out.println(result);\n","votes_up_count":0,"votes_down_count":0,"created_at":"2026-01-22T00:23:14.495Z","user_id":1006480,"category_slug":"java"},{"user":{"id":901686,"email":"1347av@gmail.com","first_name":"Алина","last_name":"Корнева","telegram":null,"full_name":"Алина Корнева","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":4676,"state":"active","body":"var a = \"First: \" + text.charAt(0) + \"/nLast: \" + text.charAt(text.lenght() - 1);\r\nSystem.out.println(a);\r\n\r\nне вижу свою ошибку. После сохранения своего решения выбрала \"подсмотреть верное решение\", и все равно, кроме формата, не вижу, в чем накосячила)))","votes_up_count":0,"votes_down_count":0,"created_at":"2025-01-20T08:58:03.659Z","user_id":901686,"category_slug":"java"},{"user":{"id":723011,"email":"vleonidasv@gmail.com","first_name":"Леонид","last_name":"Сапожников","telegram":null,"full_name":"Леонид Сапожников","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":3223,"state":"active","body":"мне кажется так будет понятнее что откуда берется:\r\n\r\n```\r\nvar text = \"Never forget what you are, for surely the world will not\";\r\nvar upText = text.toUpperCase();\r\nvar lowText = text.toLowerCase();\r\nSystem.out.println(\"First: \" + upText.charAt(0) + \"\\nLast: \" + lowText.charAt(text.length() -1));\r\n```","votes_up_count":0,"votes_down_count":5,"created_at":"2023-11-16T18:41:49.523Z","user_id":723011,"category_slug":"java"},{"user":{"id":887118,"email":"gromovoy90@ya.ru","first_name":"Sergey","last_name":null,"telegram":null,"full_name":"Sergey","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":4327,"state":"active","body":"Здравствуйте!\r\nПо мне, так будет понятней:\r\nсначала работаем с переменными(присваиваем имена и значения), чтобы в будущем могли к ним обратиться.\r\n\r\nvar text = \"Never forget what you are, for surely the world will not\";\r\n\r\nchar resultN = text.charAt(0);\r\nchar resultT = text.charAt(11);\r\nString first = \"First: \";\r\nString last = \"\\nLast: \";\r\n\r\nВыводим:\r\n\r\nSystem.out.println(first + resultN + last + resultT);\r\n\r\nСкорее всего так наиболее понятнее, что от куда взялось.","votes_up_count":0,"votes_down_count":2,"created_at":"2024-10-07T05:06:42.155Z","user_id":887118,"category_slug":"java"},{"user":{"id":536177,"email":"tafeyko89@mail.ru","first_name":"Иван","last_name":null,"telegram":null,"full_name":"Иван","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":1006,"state":"active","body":"N","votes_up_count":0,"votes_down_count":2,"created_at":"2022-10-26T16:33:56.320Z","user_id":536177,"category_slug":"java"},{"user":{"id":525942,"email":"nevskii.88@mail.ru","first_name":"Александр","last_name":null,"telegram":null,"full_name":"Александр","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":883,"state":"active","body":"Never forget what you are, for surely the world will not.charAt(0)","votes_up_count":0,"votes_down_count":2,"created_at":"2022-10-11T11:24:49.199Z","user_id":525942,"category_slug":"java"},{"user":{"id":882199,"email":"pavkaz01@gmail.com","first_name":"Pavel","last_name":null,"telegram":null,"full_name":"Pavel","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":4471,"state":"active","body":"Всем привет , начинаю учиться и много не понимаю, можете пожалуйста объяснить мне . В ваших решениях многие пишут \"First\" , но я не видел этой информации в уроках. Откуда это взялось или что изучить , что бы понять почему это нужно писать в код?\r\nПример : System.out.println( First\" + n.charAt(0) +\"\\nLast: \" + t.charAt(t.length() -1));","votes_up_count":0,"votes_down_count":0,"created_at":"2024-11-13T07:21:49.354Z","user_id":882199,"category_slug":"java"},{"user":{"id":675364,"email":"manzhuraalenaa@icloud.com","first_name":"Alena","last_name":null,"telegram":null,"full_name":"Alena","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":2971,"state":"active","body":"Мой вариант :\r\nvar text = \"Never forget what you are, for surely the world will not\";\r\n var n = \"Never\";\r\n var t = \"not\";\r\n System.out.println(\"First: \" + n.charAt(0) +\"\\nLast: \" + t.charAt(t.length() -1));\r\n","votes_up_count":0,"votes_down_count":5,"created_at":"2023-09-06T13:56:45.409Z","user_id":675364,"category_slug":"java"},{"user":{"id":977362,"email":"bint1k693@gmail.com","first_name":"Bint","last_name":null,"telegram":null,"full_name":"Bint","removed":false},"question":{"creator":{"id":1,"email":"mokevnin@gmail.com","first_name":"Kirill","last_name":"Mokevnin","telegram":"","full_name":"Kirill Mokevnin","removed":false},"category":{"id":4,"title":"Java","slug":"java","questions_count":931,"locale":"ru"},"tags":[{"id":576,"slug":"java-stroki","name":"java строки"}],"id":162,"answers_count":25,"slug":"kak-poluchit-simvol-iz-stroki-java","state":"published","title":"Как получить символ из строки java?","created_at":"2021-10-21T21:13:50.747Z","details":"","best_answer_id":2927,"related_stacks_count":5},"id":5022,"state":"active","body":"Упражнение 10 мой ответ: \r\n\r\n var text = \"Never forget what you are, for surely the world will not\";\r\n\r\n\r\n var textFLSymbols = \"First: \" + text.charAt(0) + \"\\nLast: \" + text.charAt(text.length() - 1);\r\n System.out.println(textFLSimbols);\r\n","votes_up_count":0,"votes_down_count":0,"created_at":"2025-07-14T09:16:21.829Z","user_id":977362,"category_slug":"java"}],"relatedQuestions":[],"relatedLandings":[{"stack":{"id":3,"slug":"java","title":"Java-разработчик","audience":"for_beginners","start_type":"weekly","pricing_model":"purchase","priority":"high","kind":"profession","state":"published","stack_state":"finished","order":30,"duration_in_months":10},"id":3,"slug":"java","title":"Java-разработчик","subtitle":"Изучите Java и фреймворк Spring Boot и REST API","subtitle_for_lists":"Изучите Java и фреймворк Spring Boot и REST API","locale":"ru","current":true,"duration_in_months_text":"10 месяцев","stack_slug":"java","price_text":"от 6 792 ₽","duration_text":"10 месяцев","cover_list_variant":"https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzczNSwicHVyIjoiYmxvYl9pZCJ9fQ==--883f3fd4e1b571538035b5680c8d4a9eb504b1f6/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Source%20code-amico.png"},{"stack":{"id":36,"slug":"java-sicp","title":"СИКП на Java","audience":"for_programmers","start_type":"anytime","pricing_model":"subscription","priority":"medium","kind":"track","state":"published","stack_state":"finished","order":4100,"duration_in_months":1},"id":60,"slug":"java-sicp","title":"СИКП на Java","subtitle":"Навык понимать программы на фундаментальном уровне, уверенно проходить собеседования и решать сложные задачи","subtitle_for_lists":"Изучите фундаментальные принципы программирования на Java","locale":"ru","current":true,"duration_in_months_text":"1 месяц","stack_slug":"java-sicp","price_text":"от 3 900 ₽","duration_text":"1 месяц","cover_list_variant":"https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NDAxNiwicHVyIjoiYmxvYl9pZCJ9fQ==--eb66b9b5e26fafa32844ce0f4522c3ed84544040/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Hand%20coding-rafiki.png"},{"stack":{"id":178,"slug":"fullstack-java","title":"Fullstack-разработчик на Java","audience":"for_beginners","start_type":"weekly","pricing_model":"purchase","priority":"high","kind":"profession","state":"published","stack_state":"finished","order":null,"duration_in_months":16},"id":277,"slug":"fullstack-java","title":"Fullstack-разработчик на Java","subtitle":"","subtitle_for_lists":null,"locale":"ru","current":true,"duration_in_months_text":"16 месяцев","stack_slug":"fullstack-java","price_text":"от 7 934 ₽","duration_text":"16 месяцев","cover_list_variant":"https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzY3MSwicHVyIjoiYmxvYl9pZCJ9fQ==--ca5a6047d43e5c0f6d07b52e845817fa2c47ef02/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20typing-bro.png"},{"stack":{"id":132,"slug":"spring-boot","title":"Spring Boot","audience":"for_programmers","start_type":"anytime","pricing_model":"subscription","priority":"medium","kind":"track","state":"published","stack_state":"finished","order":50,"duration_in_months":1},"id":224,"slug":"spring-boot","title":"Spring Boot","subtitle":"Навык создавать масштабируемые веб-приложения на Java с Spring Boot","subtitle_for_lists":"Навык работы с Spring Boot для масштабируемых веб-приложений","locale":"ru","current":true,"duration_in_months_text":"1 месяц","stack_slug":"spring-boot","price_text":"от 3 900 ₽","duration_text":"1 месяц","cover_list_variant":"https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzY3NSwicHVyIjoiYmxvYl9pZCJ9fQ==--b3b44cb29727c1bcb0b9aee0c285371dc12aa50f/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20typing-pana.png"},{"stack":{"id":122,"slug":"java-basics-free","title":"Основы Java","audience":"for_beginners","start_type":"anytime","pricing_model":"free","priority":"low","kind":"track","state":"published","stack_state":"finished","order":1000,"duration_in_months":1},"id":202,"slug":"java-basics-free","title":"Основы Java","subtitle":"Изучите базовые концепции: переменные, условия и циклы","subtitle_for_lists":"","locale":"ru","current":true,"duration_in_months_text":"1 месяц","stack_slug":"java-basics-free","price_text":"Бесплатно","duration_text":"1 месяц","cover_list_variant":"https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NDAxMywicHVyIjoiYmxvYl9pZCJ9fQ==--2d7c85c58ffeed73b7a953a01db194b8932851d2/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20snippets-cuate.png"}]},"url":"/qna/java/questions/kak-poluchit-simvol-iz-stroki-java","version":"8f286f6358a90a7bef2263b3a6edf5a90a94fa42","encryptHistory":false,"clearHistory":false}"><style data-mantine-styles="true">:root, :host{--mantine-font-family: Arial, sans-serif;--mantine-font-family-headings: Arial, sans-serif;--mantine-heading-font-weight: normal;--mantine-radius-default: 0rem;--mantine-primary-color-filled: var(--mantine-color-indigo-filled);--mantine-primary-color-filled-hover: var(--mantine-color-indigo-filled-hover);--mantine-primary-color-light: var(--mantine-color-indigo-light);--mantine-primary-color-light-hover: var(--mantine-color-indigo-light-hover);--mantine-primary-color-light-color: var(--mantine-color-indigo-light-color);--mantine-spacing-xxl: calc(4rem * var(--mantine-scale));--mantine-font-size-xs: 12px;--mantine-font-size-sm: 14px;--mantine-font-size-md: 16px;--mantine-font-size-lg: clamp(16.0000px, calc(15.2727px + 0.2273vw), 18.0000px);--mantine-font-size-xl: clamp(16.0000px, calc(14.5455px + 0.4545vw), 20.0000px);--mantine-font-size-display-3: clamp(32.0000px, calc(26.1818px + 1.8182vw), 48.0000px);--mantine-font-size-display-2: clamp(36.0000px, calc(25.8182px + 3.1818vw), 64.0000px);--mantine-font-size-display-1: clamp(40.0000px, calc(25.4545px + 4.5455vw), 80.0000px);--mantine-font-size-h1: clamp(28.0000px, calc(23.6364px + 1.3636vw), 40.0000px);--mantine-font-size-h2: clamp(24.0000px, calc(21.0909px + 0.9091vw), 32.0000px);--mantine-font-size-h3: clamp(20.0000px, calc(17.0909px + 0.9091vw), 28.0000px);--mantine-font-size-h4: clamp(16.0000px, calc(13.0909px + 0.9091vw), 24.0000px);--mantine-font-size-h5: clamp(16.0000px, calc(14.5455px + 0.4545vw), 20.0000px);--mantine-font-size-h6: 1rem;--mantine-primary-color-0: var(--mantine-color-indigo-0);--mantine-primary-color-1: var(--mantine-color-indigo-1);--mantine-primary-color-2: var(--mantine-color-indigo-2);--mantine-primary-color-3: var(--mantine-color-indigo-3);--mantine-primary-color-4: var(--mantine-color-indigo-4);--mantine-primary-color-5: var(--mantine-color-indigo-5);--mantine-primary-color-6: var(--mantine-color-indigo-6);--mantine-primary-color-7: var(--mantine-color-indigo-7);--mantine-primary-color-8: var(--mantine-color-indigo-8);--mantine-primary-color-9: var(--mantine-color-indigo-9);--mantine-color-red-0: #ffeaea;--mantine-color-red-1: #fed4d4;--mantine-color-red-2: #f4a7a8;--mantine-color-red-3: #ec7878;--mantine-color-red-4: #e55050;--mantine-color-red-5: #e03131;--mantine-color-red-6: #e02829;--mantine-color-red-7: #c71a1c;--mantine-color-red-8: #b21218;--mantine-color-red-9: #9c0411;--mantine-color-violet-0: #fce9ff;--mantine-color-violet-1: #f1cfff;--mantine-color-violet-2: #e09bff;--mantine-color-violet-3: #d16fff;--mantine-color-violet-4: #be37fe;--mantine-color-violet-5: #b51afe;--mantine-color-violet-6: #b009ff;--mantine-color-violet-7: #9b00e4;--mantine-color-violet-8: #8a00cc;--mantine-color-violet-9: #7800b3;--mantine-color-indigo-0: #edecff;--mantine-color-indigo-1: #d6d5fe;--mantine-color-indigo-2: #aaa9f4;--mantine-color-indigo-3: #7b79eb;--mantine-color-indigo-4: #5451e4;--mantine-color-indigo-5: #3b37e0;--mantine-color-indigo-6: #2d2adf;--mantine-color-indigo-7: #1f1ec7;--mantine-color-indigo-8: #1819b2;--mantine-color-indigo-9: #0c149e;--mantine-color-cyan-0: #dffdff;--mantine-color-cyan-1: #caf5ff;--mantine-color-cyan-2: #99e8ff;--mantine-color-cyan-3: #64daff;--mantine-color-cyan-4: #3ccffe;--mantine-color-cyan-5: #24c8fe;--mantine-color-cyan-6: #00c2ff;--mantine-color-cyan-7: #00ade4;--mantine-color-cyan-8: #009acd;--mantine-color-cyan-9: #0085b5;--mantine-color-green-0: #e9fdec;--mantine-color-green-1: #d7f6dc;--mantine-color-green-2: #b0eab9;--mantine-color-green-3: #86df94;--mantine-color-green-4: #62d574;--mantine-color-green-5: #4ccf5f;--mantine-color-green-6: #3fcc54;--mantine-color-green-7: #2fb344;--mantine-color-green-8: #25a03b;--mantine-color-green-9: #138a2e;--mantine-color-yellow-0: #fff7e2;--mantine-color-yellow-1: #ffeecd;--mantine-color-yellow-2: #ffdc9c;--mantine-color-yellow-3: #ffc966;--mantine-color-yellow-4: #feb93a;--mantine-color-yellow-5: #feae1e;--mantine-color-yellow-6: #ffa90f;--mantine-color-yellow-8: #ca8200;--mantine-color-yellow-9: #af7000;--mantine-h1-font-size: clamp(28.0000px, calc(23.6364px + 1.3636vw), 40.0000px);--mantine-h1-font-weight: normal;--mantine-h2-font-size: clamp(24.0000px, calc(21.0909px + 0.9091vw), 32.0000px);--mantine-h2-font-weight: normal;--mantine-h3-font-size: clamp(20.0000px, calc(17.0909px + 0.9091vw), 28.0000px);--mantine-h3-font-weight: normal;--mantine-h4-font-size: clamp(16.0000px, calc(13.0909px + 0.9091vw), 24.0000px);--mantine-h4-font-weight: normal;--mantine-h5-font-size: clamp(16.0000px, calc(14.5455px + 0.4545vw), 20.0000px);--mantine-h5-font-weight: normal;--mantine-h6-font-size: 1rem;--mantine-h6-font-weight: normal;}
:root[data-mantine-color-scheme="dark"], :host([data-mantine-color-scheme="dark"]){--mantine-color-anchor: var(--mantine-color-text);--mantine-color-dimmed: #495057;--mantine-color-dark-filled: var(--mantine-color-dark-5);--mantine-color-dark-filled-hover: var(--mantine-color-dark-6);--mantine-color-dark-light: rgba(105, 105, 105, 0.15);--mantine-color-dark-light-hover: rgba(105, 105, 105, 0.2);--mantine-color-dark-light-color: var(--mantine-color-dark-0);--mantine-color-dark-outline: var(--mantine-color-dark-1);--mantine-color-dark-outline-hover: rgba(184, 184, 184, 0.05);--mantine-color-gray-filled: var(--mantine-color-gray-5);--mantine-color-gray-filled-hover: var(--mantine-color-gray-6);--mantine-color-gray-light: rgba(222, 226, 230, 0.15);--mantine-color-gray-light-hover: rgba(222, 226, 230, 0.2);--mantine-color-gray-light-color: var(--mantine-color-gray-0);--mantine-color-gray-outline: var(--mantine-color-gray-1);--mantine-color-gray-outline-hover: rgba(241, 243, 245, 0.05);--mantine-color-red-filled: var(--mantine-color-red-5);--mantine-color-red-filled-hover: var(--mantine-color-red-6);--mantine-color-red-light: rgba(236, 120, 120, 0.15);--mantine-color-red-light-hover: rgba(236, 120, 120, 0.2);--mantine-color-red-light-color: var(--mantine-color-red-0);--mantine-color-red-outline: var(--mantine-color-red-1);--mantine-color-red-outline-hover: rgba(254, 212, 212, 0.05);--mantine-color-pink-filled: var(--mantine-color-pink-5);--mantine-color-pink-filled-hover: var(--mantine-color-pink-6);--mantine-color-pink-light: rgba(250, 162, 193, 0.15);--mantine-color-pink-light-hover: rgba(250, 162, 193, 0.2);--mantine-color-pink-light-color: var(--mantine-color-pink-0);--mantine-color-pink-outline: var(--mantine-color-pink-1);--mantine-color-pink-outline-hover: rgba(255, 222, 235, 0.05);--mantine-color-grape-filled: var(--mantine-color-grape-5);--mantine-color-grape-filled-hover: var(--mantine-color-grape-6);--mantine-color-grape-light: rgba(229, 153, 247, 0.15);--mantine-color-grape-light-hover: rgba(229, 153, 247, 0.2);--mantine-color-grape-light-color: var(--mantine-color-grape-0);--mantine-color-grape-outline: var(--mantine-color-grape-1);--mantine-color-grape-outline-hover: rgba(243, 217, 250, 0.05);--mantine-color-violet-filled: var(--mantine-color-violet-5);--mantine-color-violet-filled-hover: var(--mantine-color-violet-6);--mantine-color-violet-light: rgba(209, 111, 255, 0.15);--mantine-color-violet-light-hover: rgba(209, 111, 255, 0.2);--mantine-color-violet-light-color: var(--mantine-color-violet-0);--mantine-color-violet-outline: var(--mantine-color-violet-1);--mantine-color-violet-outline-hover: rgba(241, 207, 255, 0.05);--mantine-color-indigo-filled: var(--mantine-color-indigo-5);--mantine-color-indigo-filled-hover: var(--mantine-color-indigo-6);--mantine-color-indigo-light: rgba(123, 121, 235, 0.15);--mantine-color-indigo-light-hover: rgba(123, 121, 235, 0.2);--mantine-color-indigo-light-color: var(--mantine-color-indigo-0);--mantine-color-indigo-outline: var(--mantine-color-indigo-1);--mantine-color-indigo-outline-hover: rgba(214, 213, 254, 0.05);--mantine-color-blue-filled: var(--mantine-color-blue-5);--mantine-color-blue-filled-hover: var(--mantine-color-blue-6);--mantine-color-blue-light: rgba(116, 192, 252, 0.15);--mantine-color-blue-light-hover: rgba(116, 192, 252, 0.2);--mantine-color-blue-light-color: var(--mantine-color-blue-0);--mantine-color-blue-outline: var(--mantine-color-blue-1);--mantine-color-blue-outline-hover: rgba(208, 235, 255, 0.05);--mantine-color-cyan-filled: var(--mantine-color-cyan-5);--mantine-color-cyan-filled-hover: var(--mantine-color-cyan-6);--mantine-color-cyan-light: rgba(100, 218, 255, 0.15);--mantine-color-cyan-light-hover: rgba(100, 218, 255, 0.2);--mantine-color-cyan-light-color: var(--mantine-color-cyan-0);--mantine-color-cyan-outline: var(--mantine-color-cyan-1);--mantine-color-cyan-outline-hover: rgba(202, 245, 255, 0.05);--mantine-color-teal-filled: var(--mantine-color-teal-5);--mantine-color-teal-filled-hover: var(--mantine-color-teal-6);--mantine-color-teal-light: rgba(99, 230, 190, 0.15);--mantine-color-teal-light-hover: rgba(99, 230, 190, 0.2);--mantine-color-teal-light-color: var(--mantine-color-teal-0);--mantine-color-teal-outline: var(--mantine-color-teal-1);--mantine-color-teal-outline-hover: rgba(195, 250, 232, 0.05);--mantine-color-green-filled: var(--mantine-color-green-5);--mantine-color-green-filled-hover: var(--mantine-color-green-6);--mantine-color-green-light: rgba(134, 223, 148, 0.15);--mantine-color-green-light-hover: rgba(134, 223, 148, 0.2);--mantine-color-green-light-color: var(--mantine-color-green-0);--mantine-color-green-outline: var(--mantine-color-green-1);--mantine-color-green-outline-hover: rgba(215, 246, 220, 0.05);--mantine-color-lime-filled: var(--mantine-color-lime-5);--mantine-color-lime-filled-hover: var(--mantine-color-lime-6);--mantine-color-lime-light: rgba(192, 235, 117, 0.15);--mantine-color-lime-light-hover: rgba(192, 235, 117, 0.2);--mantine-color-lime-light-color: var(--mantine-color-lime-0);--mantine-color-lime-outline: var(--mantine-color-lime-1);--mantine-color-lime-outline-hover: rgba(233, 250, 200, 0.05);--mantine-color-yellow-filled: var(--mantine-color-yellow-5);--mantine-color-yellow-filled-hover: var(--mantine-color-yellow-6);--mantine-color-yellow-light: rgba(255, 201, 102, 0.15);--mantine-color-yellow-light-hover: rgba(255, 201, 102, 0.2);--mantine-color-yellow-light-color: var(--mantine-color-yellow-0);--mantine-color-yellow-outline: var(--mantine-color-yellow-1);--mantine-color-yellow-outline-hover: rgba(255, 238, 205, 0.05);--mantine-color-orange-filled: var(--mantine-color-orange-5);--mantine-color-orange-filled-hover: var(--mantine-color-orange-6);--mantine-color-orange-light: rgba(255, 192, 120, 0.15);--mantine-color-orange-light-hover: rgba(255, 192, 120, 0.2);--mantine-color-orange-light-color: var(--mantine-color-orange-0);--mantine-color-orange-outline: var(--mantine-color-orange-1);--mantine-color-orange-outline-hover: rgba(255, 232, 204, 0.05);--app-cta-gradient: linear-gradient(90deg, var(--mantine-color-blue-9) 0%, var(--mantine-color-cyan-7) 100%);--app-color-surface: #2e2e2e;}
:root[data-mantine-color-scheme="light"], :host([data-mantine-color-scheme="light"]){--mantine-color-anchor: var(--mantine-color-text);--mantine-color-dimmed: #495057;--mantine-color-red-light: rgba(224, 40, 41, 0.1);--mantine-color-red-light-hover: rgba(224, 40, 41, 0.12);--mantine-color-red-outline-hover: rgba(224, 40, 41, 0.05);--mantine-color-violet-light: rgba(176, 9, 255, 0.1);--mantine-color-violet-light-hover: rgba(176, 9, 255, 0.12);--mantine-color-violet-outline-hover: rgba(176, 9, 255, 0.05);--mantine-color-indigo-light: rgba(45, 42, 223, 0.1);--mantine-color-indigo-light-hover: rgba(45, 42, 223, 0.12);--mantine-color-indigo-outline-hover: rgba(45, 42, 223, 0.05);--mantine-color-cyan-light: rgba(0, 194, 255, 0.1);--mantine-color-cyan-light-hover: rgba(0, 194, 255, 0.12);--mantine-color-cyan-outline-hover: rgba(0, 194, 255, 0.05);--mantine-color-green-light: rgba(63, 204, 84, 0.1);--mantine-color-green-light-hover: rgba(63, 204, 84, 0.12);--mantine-color-green-outline-hover: rgba(63, 204, 84, 0.05);--mantine-color-yellow-light: rgba(255, 169, 15, 0.1);--mantine-color-yellow-light-hover: rgba(255, 169, 15, 0.12);--mantine-color-yellow-outline-hover: rgba(255, 169, 15, 0.05);--app-color-surface: #f1f3f5;--app-cta-gradient: linear-gradient(90deg, var(--mantine-color-blue-filled) 0%, var(--mantine-color-cyan-5) 100%);}</style><style data-mantine-styles="classes">@media (max-width: 35.99375em) {.mantine-visible-from-xs {display: none !important;}}@media (min-width: 36em) {.mantine-hidden-from-xs {display: none !important;}}@media (max-width: 47.99375em) {.mantine-visible-from-sm {display: none !important;}}@media (min-width: 48em) {.mantine-hidden-from-sm {display: none !important;}}@media (max-width: 61.99375em) {.mantine-visible-from-md {display: none !important;}}@media (min-width: 62em) {.mantine-hidden-from-md {display: none !important;}}@media (max-width: 74.99375em) {.mantine-visible-from-lg {display: none !important;}}@media (min-width: 75em) {.mantine-hidden-from-lg {display: none !important;}}@media (max-width: 87.99375em) {.mantine-visible-from-xl {display: none !important;}}@media (min-width: 88em) {.mantine-hidden-from-xl {display: none !important;}}</style><script type="application/ld+json">{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Как получить символ из строки java?","text":"","answerCount":25,"datePublished":"2021-10-21T21:13:50.747Z","author":{"@type":"Person","name":"Kirill Mokevnin"},"acceptedAnswer":{"@type":"Answer","text":"к упражнению 10 \r\n1. Методом length считаем общее количество символов\r\n2. Методом charAt(...) находится значение первого и последнего символа\r\n3. Методом \\n создается перенос строки\r\n4. Не забываем про пробелы в выводе результатов.","datePublished":"2023-06-25T16:04:59.963Z","upvoteCount":6,"author":{"@type":"Person","name":"Aleksandr"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-2927"},"suggestedAnswer":[{"@type":"Answer","text":"Для извлечения символа из строки используется метод `charAt()`. Он принимает на вход позицию (индекс) по которому находится нужный символ. Отсчет индексов начинается с нуля. То есть первый символ имеет нулевой индекс, первый – второй и так далее.\r\n\r\n```java\r\n"wow".charAt(1); // 'o'\r\n\r\nvar company = "Hexlet";\r\n\r\ncompany.charAt(0); // 'H'\r\ncompany.charAt(3); // 'l'\r\n```\r\n\r\nЕсли выйти за границу доступных букв, то возникнет ошибка:\r\n\r\n```java\r\ncompany.charAt(-1); // Error: String index out of range: -1\r\n\r\ncompany.charAt(10); // Error: cannot find symbol\r\n\r\n```","datePublished":"2021-10-21T21:18:30.065Z","upvoteCount":29,"author":{"@type":"Person","name":"Kirill Mokevnin"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-14"},{"@type":"Answer","text":"Упражнение 10. Мой вариант:)\r\n\r\n\r\n var text = "Never forget what you are, for surely the world will not";\r\n System.out.println("First: " + text.charAt(0) + "\\nLast: " + text.charAt(text.length() -1));","datePublished":"2023-06-30T13:28:05.127Z","upvoteCount":25,"author":{"@type":"Person","name":"Ольга Вебер"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-2931"},{"@type":"Answer","text":"Добрый день! А в скобки в charAt можно занести какую-нибудь информацию, что бы она вывела мне последний символ, что бы мне не приходилось сидеть и считать буквы?","datePublished":"2023-02-03T13:35:16.016Z","upvoteCount":13,"author":{"@type":"Person","name":"Ильяс"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-1671"},{"@type":"Answer","text":"\r\nМетодом length считаем общее количество символов и вычитаем 1, так как считаем с 0. Это и будет индекс последнего символа.\r\n","datePublished":"2023-02-09T14:59:57.207Z","upvoteCount":9,"author":{"@type":"Person","name":"Person"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-1697"},{"@type":"Answer","text":"В этой ветке все активно обсуждают задание номер 10. Поэтому я тоже хочу!\r\nДля начала хочется заметить, что это задание вызвало у меня существенный ступор. Хотя я уже проходил его на CodeBasics, будучи никем в программировании это решение быстро превратилось в "кашу" у меня в голове и забылось. \r\nНаверное потому, что у меня до этого задания был "барьер" в голове, о том, могу ли я делать конкатенацию с методом или тварь я дрожащая. Ну и ко всему прочему, меня пугали длинные выражения.\r\n\r\nТеперь я знаю, я буду конкатенировать всё, что мне попадёт под руку, может даже сделаю КОДоПСА.\r\n\r\nМоё решение задания номер 10:\r\n-----------------------------------------------------------------------------\r\nvar text = "Never forget what you are, for surely the world will not";\r\n\r\nvar a = "First: " + text.charAt(0) + "\\nLast: " + text.charAt(55);\r\n\r\nSystem.out.println(a);\r\n","datePublished":"2023-12-28T08:53:39.101Z","upvoteCount":2,"author":{"@type":"Person","name":"Егвений Жуков"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-3340"},{"@type":"Answer","text":"Просто надо привыкнуть, что Java рождался из C языков. Там все массивы с 0))) Строки - это тож массивы(точнее не массивы а ссылки). Тем кто начинал с Basic или Pascal сложнее, там со строками проще иногда. ","datePublished":"2023-11-23T11:30:54.489Z","upvoteCount":2,"author":{"@type":"Person","name":"Сергей"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-3323"},{"@type":"Answer","text":"System.out.println("First: " + text.charAt(0) + "\\nLast: " + text.charAt(text.length()-1));","datePublished":"2024-06-06T03:36:52.957Z","upvoteCount":2,"author":{"@type":"Person","name":"Xformer"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-3823"},{"@type":"Answer","text":"var text = "Never forget what you are, for surely the world will not";\r\n\r\n \r\n var text2 = "not";\r\n System.out.println("First: "+ text.charAt(0)+"\\nLast: "+ text2.charAt(2));","datePublished":"2023-11-23T08:49:54.767Z","upvoteCount":1,"author":{"@type":"Person","name":"Константин Петров"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-3322"},{"@type":"Answer","text":"System.out.println("First: "+text.charAt(0)+"\\nLast: "+text.charAt(55));","datePublished":"2023-09-20T06:30:06.335Z","upvoteCount":1,"author":{"@type":"Person","name":"Person"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-2976"},{"@type":"Answer","text":"Упражнение 10 мой ответ: \r\n\r\n# var text = "Never forget what you are, for surely the world will not";\r\n\r\n\r\n var textFLSymbols = "First: " + text.charAt(0) + "\\nLast: " + text.charAt(text.length() - 1);\r\n System.out.println(textFLSimbols);\r\n\r\nне один из ваших вариантов не является верным так как в условии задания написано, что вы должны добавить переменную и уже ее засунуть в System.out.println","datePublished":"2025-07-14T09:27:12.173Z","upvoteCount":0,"author":{"@type":"Person","name":"Bint"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-5023"},{"@type":"Answer","text":"Мой вариант 10-го задания с использованием полученных знаний на Hexlet:\r\nSystem.out.println("First: " + text.charAt(0) + "\\n" + "Last: " + text.charAt(text.length() - 1));","datePublished":"2025-02-10T15:01:22.761Z","upvoteCount":0,"author":{"@type":"Person","name":"Эдгар"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-4684"},{"@type":"Answer","text":"В задании написано, что нужно создать только одну переменную и записать в нее все выражение ДО вывода на экран!\r\nПоэтому создаем переменную и записываем в нее составное выражение с конкатенацией строк с методами и символом переноса строки. Чтобы получить последний символ, нужно в атрибут метода получения символа вместо индекса вставить метод подсчета количества символов и вычесть 1 (так как индекс считается от 0).","datePublished":"2024-11-23T20:29:03.446Z","upvoteCount":0,"author":{"@type":"Person","name":"Andrey"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-4505"},{"@type":"Answer","text":"Интересный факто. Все "правильные" решения с text.charAt(text.lenght() -1) - заслуга Чата GPT. \r\nИ лишь те немногие с text.charAt(55) сами решили. Хоть это решение не верно и малофункционально. Ибо невозможно додуматся до конструкции где вместо вызываемой буквы, в методе, мы засовываем еще один метод. Ибо это даже приблизительно нигде не упоминалось.\r\nА так... "пройти" задачу можно было элементарным System.out.println("First: N" + "\\nLast: t"); что просто глупый ответ на глупый вопрос. Только если у вопроса не было задачи стимулировать искать ответ в интернете.","datePublished":"2025-08-19T16:33:46.612Z","upvoteCount":0,"author":{"@type":"Person","name":"Core"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-5061"},{"@type":"Answer","text":"var text = "Never forget what you are, for surely the world will not";\r\n var t1 = text.charAt(0);\r\n var t2 = text.charAt(55);\r\n System.out.println ("First: "+t1+"\\nLast: "+t2);","datePublished":"2024-04-03T09:42:43.242Z","upvoteCount":0,"author":{"@type":"Person","name":"Сергей Бажанов"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-3484"},{"@type":"Answer","text":" var text = "Never forget what you are, for surely the world will not";\r\n\r\n var result = "First: " + text.charAt(0) + "\\nLast: " + text.charAt(text.length() - 1);\r\n System.out.println(result);","datePublished":"2025-05-14T02:32:42.997Z","upvoteCount":0,"author":{"@type":"Person","name":"Александр Никифоров"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-4985"},{"@type":"Answer","text":"var result = "First: " + text.charAt(0) + "\\nLast: " + text.charAt(text.length() - 1);\nSystem.out.println(result);\n","datePublished":"2026-01-22T00:23:14.495Z","upvoteCount":0,"author":{"@type":"Person","name":"Павел Бедрев"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-5435"},{"@type":"Answer","text":"var a = "First: " + text.charAt(0) + "/nLast: " + text.charAt(text.lenght() - 1);\r\nSystem.out.println(a);\r\n\r\nне вижу свою ошибку. После сохранения своего решения выбрала "подсмотреть верное решение", и все равно, кроме формата, не вижу, в чем накосячила)))","datePublished":"2025-01-20T08:58:03.659Z","upvoteCount":0,"author":{"@type":"Person","name":"Алина Корнева"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-4676"},{"@type":"Answer","text":"мне кажется так будет понятнее что откуда берется:\r\n\r\n```\r\nvar text = "Never forget what you are, for surely the world will not";\r\nvar upText = text.toUpperCase();\r\nvar lowText = text.toLowerCase();\r\nSystem.out.println("First: " + upText.charAt(0) + "\\nLast: " + lowText.charAt(text.length() -1));\r\n```","datePublished":"2023-11-16T18:41:49.523Z","upvoteCount":0,"author":{"@type":"Person","name":"Леонид Сапожников"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-3223"},{"@type":"Answer","text":"Здравствуйте!\r\nПо мне, так будет понятней:\r\nсначала работаем с переменными(присваиваем имена и значения), чтобы в будущем могли к ним обратиться.\r\n\r\nvar text = "Never forget what you are, for surely the world will not";\r\n\r\nchar resultN = text.charAt(0);\r\nchar resultT = text.charAt(11);\r\nString first = "First: ";\r\nString last = "\\nLast: ";\r\n\r\nВыводим:\r\n\r\nSystem.out.println(first + resultN + last + resultT);\r\n\r\nСкорее всего так наиболее понятнее, что от куда взялось.","datePublished":"2024-10-07T05:06:42.155Z","upvoteCount":0,"author":{"@type":"Person","name":"Sergey"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-4327"},{"@type":"Answer","text":"N","datePublished":"2022-10-26T16:33:56.320Z","upvoteCount":0,"author":{"@type":"Person","name":"Иван"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-1006"},{"@type":"Answer","text":"Never forget what you are, for surely the world will not.charAt(0)","datePublished":"2022-10-11T11:24:49.199Z","upvoteCount":0,"author":{"@type":"Person","name":"Александр"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-883"},{"@type":"Answer","text":"Всем привет , начинаю учиться и много не понимаю, можете пожалуйста объяснить мне . В ваших решениях многие пишут "First" , но я не видел этой информации в уроках. Откуда это взялось или что изучить , что бы понять почему это нужно писать в код?\r\nПример : System.out.println( First" + n.charAt(0) +"\\nLast: " + t.charAt(t.length() -1));","datePublished":"2024-11-13T07:21:49.354Z","upvoteCount":0,"author":{"@type":"Person","name":"Pavel"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-4471"},{"@type":"Answer","text":"Мой вариант :\r\nvar text = "Never forget what you are, for surely the world will not";\r\n var n = "Never";\r\n var t = "not";\r\n System.out.println("First: " + n.charAt(0) +"\\nLast: " + t.charAt(t.length() -1));\r\n","datePublished":"2023-09-06T13:56:45.409Z","upvoteCount":0,"author":{"@type":"Person","name":"Alena"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-2971"},{"@type":"Answer","text":"Упражнение 10 мой ответ: \r\n\r\n var text = "Never forget what you are, for surely the world will not";\r\n\r\n\r\n var textFLSymbols = "First: " + text.charAt(0) + "\\nLast: " + text.charAt(text.length() - 1);\r\n System.out.println(textFLSimbols);\r\n","datePublished":"2025-07-14T09:16:21.829Z","upvoteCount":0,"author":{"@type":"Person","name":"Bint"},"url":"https://ru.hexlet.io/qna/java/questions/kak-poluchit-simvol-iz-stroki-java#answer-5022"}]}}</script><div style="--container-size:var(--container-size-lg);margin-top:var(--mantine-spacing-xl);height:100%" class="m_7485cace mantine-Container-root" data-size="lg" data-strategy="block"><script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"position":1,"@type":"ListItem","item":{"@id":"/qna","name":"Вопросы и ответы"}},{"position":2,"@type":"ListItem","item":{"@id":"/qna/java/questions","name":"Java"}},{"position":3,"@type":"ListItem","item":{"@id":"/qna/java/questions/kak-poluchit-simvol-iz-stroki-java","name":"Как получить символ из строки java?"}}]}</script><div style="margin-bottom:var(--mantine-spacing-xs)" class="m_8b3717df mantine-Breadcrumbs-root"><a style="--text-fz:var(--mantine-font-size-sm);--text-lh:var(--mantine-line-height-sm);white-space:normal;color:inherit" class="mantine-focus-auto m_849cf0da m_f678d540 mantine-Breadcrumbs-breadcrumb m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-size="sm" data-underline="hover" href="/"><div style="color:inherit" class="m_4451eb3a mantine-Center-root"><svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-home-link "><path d="M20.085 11.085l-8.085 -8.085l-9 9h2v7a2 2 0 0 0 2 2h4.5"></path><path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 1.807 1.143"></path><path d="M20 21a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path><path d="M20 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path><path d="M15 19a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"></path><path d="M21 16l-5 3l5 2"></path></svg></div></a><div class="m_3b8f2208 mantine-Breadcrumbs-separator">/</div><a style="--text-fz:var(--mantine-font-size-sm);--text-lh:var(--mantine-line-height-sm);white-space:normal;color:inherit" class="mantine-focus-auto m_849cf0da m_f678d540 mantine-Breadcrumbs-breadcrumb m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-size="sm" data-underline="hover" href="/qna">Вопросы и ответы</a><div class="m_3b8f2208 mantine-Breadcrumbs-separator">/</div><a style="--text-fz:var(--mantine-font-size-sm);--text-lh:var(--mantine-line-height-sm);white-space:normal;color:inherit" class="mantine-focus-auto m_849cf0da m_f678d540 mantine-Breadcrumbs-breadcrumb m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-size="sm" data-underline="hover" href="/qna/java/questions">Java</a><div class="m_3b8f2208 mantine-Breadcrumbs-separator">/</div><p style="--text-fz:var(--mantine-font-size-sm);--text-lh:var(--mantine-line-height-sm);white-space:normal;color:var(--mantine-color-dimmed)" class="mantine-focus-auto m_f678d540 mantine-Breadcrumbs-breadcrumb m_b6d8b162 mantine-Text-root" data-size="sm">Как получить символ из строки java?</p></div><style data-mantine-styles="inline">.__m__-_R_eub_{margin-bottom:var(--mantine-spacing-xs);}@media(min-width: 36em){.__m__-_R_eub_{margin-bottom:var(--mantine-spacing-xs);}}</style><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:space-between;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root __m__-_R_eub_"><style data-mantine-styles="inline">.__m__-_R_deub_{width:100%;}@media(min-width: 36em){.__m__-_R_deub_{width:70%;}}@media(min-width: 75em){.__m__-_R_deub_{width:75%;}}</style><div class="__m__-_R_deub_"><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><h1 style="--title-fw:var(--mantine-h1-font-weight);--title-lh:var(--mantine-h1-line-height);--title-fz:var(--mantine-h1-font-size)" class="m_8a5d1357 mantine-Title-root" data-order="1">Как получить символ из строки java?</h1></div></div></div><style data-mantine-styles="inline">.__m__-_R_iub_{--grid-gutter:var(--mantine-spacing-md);}</style><div class="m_410352e9 mantine-Grid-root __m__-_R_iub_"><div class="m_dee7bd2f mantine-Grid-inner"><style data-mantine-styles="inline">.__m__-_R_3diub_{--col-flex-grow:auto;--col-flex-basis:100%;--col-max-width:100%;}@media(min-width: 48em){.__m__-_R_3diub_{--col-flex-grow:auto;--col-flex-basis:83.33333333333334%;--col-max-width:83.33333333333334%;}}@media(min-width: 62em){.__m__-_R_3diub_{--col-flex-grow:auto;--col-flex-basis:66.66666666666667%;--col-max-width:66.66666666666667%;}}</style><div class="m_96bdd299 mantine-Grid-col __m__-_R_3diub_"><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-bottom:var(--mantine-spacing-lg)" class="m_4081bf90 mantine-Group-root"><a class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/tags/java-stroki"><div style="--badge-height:var(--badge-height-sm);--badge-padding-x:var(--badge-padding-x-sm);--badge-fz:var(--badge-fz-sm);--badge-bg:var(--mantine-color-default);--badge-color:var(--mantine-color-default-color);--badge-bd:calc(0.0625rem * var(--mantine-scale)) solid var(--mantine-color-default-border);cursor:pointer" class="m_347db0ec mantine-Badge-root" data-variant="default" data-size="sm"><span class="m_5add502a mantine-Badge-label">java строки</span></div></a></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-bottom:var(--mantine-spacing-xl);font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:calc(0.25rem * var(--mantine-scale));--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">4 года назад</p></div><div style="--group-gap:calc(0.25rem * var(--mantine-scale));--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Kirill Mokevnin</p></div></div><div role="link" tabindex="0" style="cursor:pointer"><button style="display:block;width:100%" class="mantine-focus-auto m_87cf2631 mantine-UnstyledButton-root" type="button" aria-label="Присоединяйтесь к нашему Telegram-сообществу"><div style="background-color:light-dark(var(--mantine-color-gray-1), var(--mantine-color-dark-6));margin-block:var(--mantine-spacing-xs)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root"><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;margin-inline-end:auto;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-brand-telegram "><path d="M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4"></path></svg></div>Присоединяйтесь к нашему Telegram-сообществу</div></div></button></div><h2 style="--title-fw:var(--mantine-h2-font-weight);--title-lh:var(--mantine-h2-line-height);--title-fz:var(--mantine-h2-font-size);margin-block:var(--mantine-spacing-xl)" class="m_8a5d1357 mantine-Title-root" data-order="2">Ответы</h2><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-14"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">29<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/14/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Для извлечения символа из строки используется метод <code style="margin-bottom:var(--mantine-spacing-lg)" class="m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight m_e597c321 mantine-CodeHighlight-codeHighlight m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight">charAt()</code>. Он принимает на вход позицию (индекс) по которому находится нужный символ. Отсчет индексов начинается с нуля. То есть первый символ имеет нулевой индекс, первый – второй и так далее.</p>
<div style="margin-bottom:var(--mantine-spacing-lg)" class="m_e597c321 mantine-CodeHighlight-codeHighlight" dir="ltr"><div class="m_be7e9c9c mantine-CodeHighlight-controls"><button style="--ai-bg:transparent;--ai-hover:transparent;--ai-color:inherit;--ai-bd:none" class="mantine-focus-auto mantine-active m_d498bab7 mantine-CodeHighlight-control m_8d3f4000 mantine-ActionIcon-root m_87cf2631 mantine-UnstyledButton-root" data-variant="none" type="button" aria-label="Copy code"><span class="m_8d3afb97 mantine-ActionIcon-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"></path><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path></svg></span></button></div><div style="--scrollarea-scrollbar-size:calc(0.25rem * var(--mantine-scale));--sa-corner-width:0px;--sa-corner-height:0px" class="m_f744fd40 mantine-CodeHighlight-scrollarea m_d57069b5 mantine-ScrollArea-root" dir="ltr"><div style="overflow-x:hidden;overflow-y:hidden;overscroll-behavior-inline:none" class="m_c0783ff9 mantine-ScrollArea-viewport" data-scrollbars="xy"><div class="m_b1336c6 mantine-ScrollArea-content"><pre class="m_2c47c4fd mantine-CodeHighlight-pre" style="padding:0"><code class="m_5caae6d3 mantine-CodeHighlight-code">"wow".charAt(1); // 'o'
var company = "Hexlet";
company.charAt(0); // 'H'
company.charAt(3); // 'l'</code></pre></div></div></div><button class="mantine-focus-auto m_c9378bc2 mantine-CodeHighlight-showCodeButton m_87cf2631 mantine-UnstyledButton-root" data-hidden="true" type="button">Expand code</button></div>
<p>Если выйти за границу доступных букв, то возникнет ошибка:</p>
<div style="margin-bottom:var(--mantine-spacing-lg)" class="m_e597c321 mantine-CodeHighlight-codeHighlight" dir="ltr"><div class="m_be7e9c9c mantine-CodeHighlight-controls"><button style="--ai-bg:transparent;--ai-hover:transparent;--ai-color:inherit;--ai-bd:none" class="mantine-focus-auto mantine-active m_d498bab7 mantine-CodeHighlight-control m_8d3f4000 mantine-ActionIcon-root m_87cf2631 mantine-UnstyledButton-root" data-variant="none" type="button" aria-label="Copy code"><span class="m_8d3afb97 mantine-ActionIcon-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 8m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z"></path><path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2"></path></svg></span></button></div><div style="--scrollarea-scrollbar-size:calc(0.25rem * var(--mantine-scale));--sa-corner-width:0px;--sa-corner-height:0px" class="m_f744fd40 mantine-CodeHighlight-scrollarea m_d57069b5 mantine-ScrollArea-root" dir="ltr"><div style="overflow-x:hidden;overflow-y:hidden;overscroll-behavior-inline:none" class="m_c0783ff9 mantine-ScrollArea-viewport" data-scrollbars="xy"><div class="m_b1336c6 mantine-ScrollArea-content"><pre class="m_2c47c4fd mantine-CodeHighlight-pre" style="padding:0"><code class="m_5caae6d3 mantine-CodeHighlight-code">company.charAt(-1); // Error: String index out of range: -1
company.charAt(10); // Error: cannot find symbol</code></pre></div></div></div><button class="mantine-focus-auto m_c9378bc2 mantine-CodeHighlight-showCodeButton m_87cf2631 mantine-UnstyledButton-root" data-hidden="true" type="button">Expand code</button></div></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">4 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Kirill Mokevnin</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-2931"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">25<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/2931/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Упражнение 10. Мой вариант:)</p>
<p>var text = "Never forget what you are, for surely the world will not";
System.out.println("First: " + text.charAt(0) + "\nLast: " + text.charAt(text.length() -1));</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">3 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Ольга Вебер</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-1671"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">13<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/1671/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Добрый день! А в скобки в charAt можно занести какую-нибудь информацию, что бы она вывела мне последний символ, что бы мне не приходилось сидеть и считать буквы?</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">3 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Ильяс</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-1697"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">9<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/1697/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Методом length считаем общее количество символов и вычитаем 1, так как считаем с 0. Это и будет индекс последнего символа.</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">3 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true"></p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-2927"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">6<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/2927/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-check "><path d="M5 12l5 5l10 -10"></path></svg></div></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>к упражнению 10</p>
<ol>
<li>Методом length считаем общее количество символов</li>
<li>Методом charAt(...) находится значение первого и последнего символа</li>
<li>Методом \n создается перенос строки</li>
<li>Не забываем про пробелы в выводе результатов.</li>
</ol></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">3 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Aleksandr</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-3340"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">2<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/3340/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>В этой ветке все активно обсуждают задание номер 10. Поэтому я тоже хочу!
Для начала хочется заметить, что это задание вызвало у меня существенный ступор. Хотя я уже проходил его на CodeBasics, будучи никем в программировании это решение быстро превратилось в "кашу" у меня в голове и забылось.
Наверное потому, что у меня до этого задания был "барьер" в голове, о том, могу ли я делать конкатенацию с методом или тварь я дрожащая. Ну и ко всему прочему, меня пугали длинные выражения.</p>
<p>Теперь я знаю, я буду конкатенировать всё, что мне попадёт под руку, может даже сделаю КОДоПСА.</p>
<h2 id="heading-2-1">Моё решение задания номер 10:</h2>
<p>var text = "Never forget what you are, for surely the world will not";</p>
<p>var a = "First: " + text.charAt(0) + "\nLast: " + text.charAt(55);</p>
<p>System.out.println(a);</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Егвений Жуков</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-3323"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">2<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/3323/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Просто надо привыкнуть, что Java рождался из C языков. Там все массивы с 0))) Строки - это тож массивы(точнее не массивы а ссылки). Тем кто начинал с Basic или Pascal сложнее, там со строками проще иногда.</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Сергей</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-3823"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">2<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/3823/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>System.out.println("First: " + text.charAt(0) + "\nLast: " + text.charAt(text.length()-1));</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Xformer</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-3322"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">1<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/3322/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>var text = "Never forget what you are, for surely the world will not";</p>
<code style="margin-bottom:var(--mantine-spacing-lg)" class="m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight m_e597c321 mantine-CodeHighlight-codeHighlight m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight">var text2 = "not";
System.out.println("First: "+ text.charAt(0)+"\nLast: "+ text2.charAt(2));</code></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Константин Петров</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-2976"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">1<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/2976/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>System.out.println("First: "+text.charAt(0)+"\nLast: "+text.charAt(55));</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true"></p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-5023"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/5023/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Упражнение 10 мой ответ:</p>
<h1 id="heading-1-1">var text = "Never forget what you are, for surely the world will not";</h1>
<code style="margin-bottom:var(--mantine-spacing-lg)" class="m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight m_e597c321 mantine-CodeHighlight-codeHighlight m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight">var textFLSymbols = "First: " + text.charAt(0) + "\nLast: " + text.charAt(text.length() - 1);
System.out.println(textFLSimbols);</code>
<p>не один из ваших вариантов не является верным так как в условии задания написано, что вы должны добавить переменную и уже ее засунуть в System.out.println</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">7 месяцев назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Bint</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-4684"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/4684/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Мой вариант 10-го задания с использованием полученных знаний на Hexlet:
System.out.println("First: " + text.charAt(0) + "\n" + "Last: " + text.charAt(text.length() - 1));</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">год назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Эдгар</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-4505"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/4505/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>В задании написано, что нужно создать только одну переменную и записать в нее все выражение ДО вывода на экран!
Поэтому создаем переменную и записываем в нее составное выражение с конкатенацией строк с методами и символом переноса строки. Чтобы получить последний символ, нужно в атрибут метода получения символа вместо индекса вставить метод подсчета количества символов и вычесть 1 (так как индекс считается от 0).</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">год назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Andrey</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-5061"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/5061/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Интересный факто. Все "правильные" решения с text.charAt(text.lenght() -1) - заслуга Чата GPT.
И лишь те немногие с text.charAt(55) сами решили. Хоть это решение не верно и малофункционально. Ибо невозможно додуматся до конструкции где вместо вызываемой буквы, в методе, мы засовываем еще один метод. Ибо это даже приблизительно нигде не упоминалось.
А так... "пройти" задачу можно было элементарным System.out.println("First: N" + "\nLast: t"); что просто глупый ответ на глупый вопрос. Только если у вопроса не было задачи стимулировать искать ответ в интернете.</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">6 месяцев назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Core</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-3484"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/3484/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>var text = "Never forget what you are, for surely the world will not";
var t1 = text.charAt(0);
var t2 = text.charAt(55);
System.out.println ("First: "+t1+"\nLast: "+t2);</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Сергей Бажанов</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-4985"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/4985/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><code style="margin-bottom:var(--mantine-spacing-lg)" class="m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight m_e597c321 mantine-CodeHighlight-codeHighlight m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight">var text = "Never forget what you are, for surely the world will not";
var result = "First: " + text.charAt(0) + "\nLast: " + text.charAt(text.length() - 1);
System.out.println(result);</code></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">9 месяцев назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Александр Никифоров</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-5435"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/5435/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>var result = "First: " + text.charAt(0) + "\nLast: " + text.charAt(text.length() - 1);
System.out.println(result);</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">месяц назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Павел Бедрев</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-4676"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/4676/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>var a = "First: " + text.charAt(0) + "/nLast: " + text.charAt(text.lenght() - 1);
System.out.println(a);</p>
<p>не вижу свою ошибку. После сохранения своего решения выбрала "подсмотреть верное решение", и все равно, кроме формата, не вижу, в чем накосячила)))</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">год назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Алина Корнева</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-3223"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/3223/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>мне кажется так будет понятнее что откуда берется:</p>
<code style="margin-bottom:var(--mantine-spacing-lg)" class="m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight m_e597c321 mantine-CodeHighlight-codeHighlight m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight">var text = "Never forget what you are, for surely the world will not";
var upText = text.toUpperCase();
var lowText = text.toLowerCase();
System.out.println("First: " + upText.charAt(0) + "\nLast: " + lowText.charAt(text.length() -1));</code></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Леонид Сапожников</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-4327"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/4327/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Здравствуйте!
По мне, так будет понятней:
сначала работаем с переменными(присваиваем имена и значения), чтобы в будущем могли к ним обратиться.</p>
<p>var text = "Never forget what you are, for surely the world will not";</p>
<p>char resultN = text.charAt(0);
char resultT = text.charAt(11);
String first = "First: ";
String last = "\nLast: ";</p>
<p>Выводим:</p>
<p>System.out.println(first + resultN + last + resultT);</p>
<p>Скорее всего так наиболее понятнее, что от куда взялось.</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">год назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Sergey</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-1006"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/1006/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>N</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">3 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Иван</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-883"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/883/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Never forget what you are, for surely the world will not.charAt(0)</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">3 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Александр</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-4471"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/4471/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Всем привет , начинаю учиться и много не понимаю, можете пожалуйста объяснить мне . В ваших решениях многие пишут "First" , но я не видел этой информации в уроках. Откуда это взялось или что изучить , что бы понять почему это нужно писать в код?
Пример : System.out.println( First" + n.charAt(0) +"\nLast: " + t.charAt(t.length() -1));</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">год назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Pavel</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-2971"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/2971/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Мой вариант :
var text = "Never forget what you are, for surely the world will not";
var n = "Never";
var t = "not";
System.out.println("First: " + n.charAt(0) +"\nLast: " + t.charAt(t.length() -1));</p></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">2 года назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Alena</p></div></div></div></div></div><div style="margin-bottom:var(--mantine-spacing-xl);padding:var(--mantine-spacing-lg)" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true" id="answer-5022"><div style="--group-gap:calc(1.125rem * var(--mantine-scale));--group-align:stretch;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;font-size:var(--mantine-font-size-h1);font-weight:lighter;text-align:center" class="m_6d731127 mantine-Stack-root">0<a style="color:inherit" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/qna/java/questions/kak-poluchit-simvol-iz-stroki-java/answers/5022/vote"><div style="--ti-bg:transparent;--ti-color:var(--mantine-color-indigo-light-color);--ti-bd:calc(0.0625rem * var(--mantine-scale)) solid transparent;color:inherit" class="m_7341320d mantine-ThemeIcon-root" data-variant="transparent"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-thumb-up "><path d="M7 11v8a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1v-7a1 1 0 0 1 1 -1h3a4 4 0 0 0 4 -4v-1a2 2 0 0 1 4 0v5h3a2 2 0 0 1 2 2l-1 5a2 3 0 0 1 -2 2h-7a3 3 0 0 1 -3 -3"></path></svg></div></a></div><div style="--stack-gap:var(--mantine-spacing-md);--stack-align:stretch;--stack-justify:flex-start;width:100%;min-width:0rem" class="m_6d731127 mantine-Stack-root"><div style="margin-bottom:auto" class="m_d08caa0 mantine-Typography-root"><p>Упражнение 10 мой ответ:</p>
<code style="margin-bottom:var(--mantine-spacing-lg)" class="m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight m_e597c321 mantine-CodeHighlight-codeHighlight m_dfe9c588 mantine-InlineCodeHighlight-inlineCodeHighlight">var text = "Never forget what you are, for surely the world will not";
var textFLSymbols = "First: " + text.charAt(0) + "\nLast: " + text.charAt(text.length() - 1);
System.out.println(textFLSimbols);</code></div><div class="m_3eebeb36 mantine-Divider-root" data-orientation="horizontal" role="separator"></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;font-size:var(--mantine-font-size-sm)" class="m_4081bf90 mantine-Group-root"><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap;margin-inline-start:auto" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-calendar "><path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12"></path><path d="M16 3v4"></path><path d="M8 3v4"></path><path d="M4 11h16"></path><path d="M11 15h1"></path><path d="M12 15v3"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">7 месяцев назад</p></div><div style="--group-gap:var(--mantine-spacing-xs);--group-align:center;--group-justify:flex-start;--group-wrap:wrap" class="m_4081bf90 mantine-Group-root"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round" class="tabler-icon tabler-icon-user "><path d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0"></path><path d="M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2"></path></svg><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root" data-inherit="true">Bint</p></div></div></div></div></div><style data-mantine-styles="inline">.__m__-_R_4bbdiub_{--carousel-slide-gap:var(--mantine-spacing-xs);--carousel-slide-size:70%;}@media(min-width: 36em){.__m__-_R_4bbdiub_{--carousel-slide-gap:var(--mantine-spacing-xl);--carousel-slide-size:50%;}}</style><div style="--carousel-control-size:calc(2.5rem * var(--mantine-scale));--carousel-controls-offset:var(--mantine-spacing-sm);margin-top:var(--mantine-spacing-xl);margin-bottom:var(--mantine-spacing-lg);padding-block:var(--mantine-spacing-sm);background:var(--app-color-surface)" class="m_17884d0f mantine-Carousel-root responsiveClassName" data-orientation="horizontal" data-include-gap-in-size="true"><div class="m_39bc3463 mantine-Carousel-controls" data-orientation="horizontal"><button class="mantine-focus-auto m_64f58e10 mantine-Carousel-control m_87cf2631 mantine-UnstyledButton-root" type="button" data-inactive="true" data-type="previous" tabindex="-1"><svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" style="transform:rotate(90deg);width:calc(1rem * var(--mantine-scale));height:calc(1rem * var(--mantine-scale));display:block"><path d="M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg></button><button class="mantine-focus-auto m_64f58e10 mantine-Carousel-control m_87cf2631 mantine-UnstyledButton-root" type="button" data-inactive="true" data-type="next" tabindex="-1"><svg viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg" style="transform:rotate(-90deg);width:calc(1rem * var(--mantine-scale));height:calc(1rem * var(--mantine-scale));display:block"><path d="M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd"></path></svg></button></div><div class="m_a2dae653 mantine-Carousel-viewport" data-type="media"><div class="m_fcd81474 mantine-Carousel-container __m__-_R_4bbdiub_" data-orientation="horizontal"><div class="m_d98df724 mantine-Carousel-slide" data-orientation="horizontal"><div tabindex="0" style="cursor:pointer;height:100%"><a style="text-decoration:none" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/programs/java?promo_name=programs_list&promo_position=qna_question&promo_creative=catalog_card&promo_type=card" target="_blank"><div style="height:100%" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true"><div style="--group-gap:calc(0.25rem * var(--mantine-scale));--group-align:center;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">10 месяцев</span><span class="mantine-focus-auto m_b6d8b162 mantine-Text-root">·</span><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">С нуля</span></div><p style="margin-bottom:var(--mantine-spacing-sm);font-size:var(--mantine-font-size-h5);font-weight:bold" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Java-разработчик</p><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Изучите Java и фреймворк Spring Boot и REST API</p><div style="margin-top:auto" class=""><div class="m_4451eb3a mantine-Center-root"><img style="opacity:0.8;width:70%" class="m_9e117634 mantine-Image-root mantine-visible-from-xs" src="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzczNSwicHVyIjoiYmxvYl9pZCJ9fQ==--883f3fd4e1b571538035b5680c8d4a9eb504b1f6/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Source%20code-amico.png" alt="Java-разработчик" loading="eager"/></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:end;--group-justify:space-between;--group-wrap:wrap;margin-top:var(--mantine-spacing-xs)" class="m_4081bf90 mantine-Group-root"><p style="font-size:var(--mantine-font-size-xl)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">от 6 792 ₽</p><p style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Посмотреть →</p></div></div></div></a></div></div><div class="m_d98df724 mantine-Carousel-slide" data-orientation="horizontal"><div tabindex="0" style="cursor:pointer;height:100%"><a style="text-decoration:none" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/programs/java-sicp?promo_name=programs_list&promo_position=qna_question&promo_creative=catalog_card&promo_type=card" target="_blank"><div style="height:100%" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true"><div style="--group-gap:calc(0.25rem * var(--mantine-scale));--group-align:center;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">1 месяц</span><span class="mantine-focus-auto m_b6d8b162 mantine-Text-root">·</span><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Для продвинутых</span></div><p style="margin-bottom:var(--mantine-spacing-sm);font-size:var(--mantine-font-size-h5);font-weight:bold" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">СИКП на Java</p><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Изучите фундаментальные принципы программирования на Java</p><div style="margin-top:auto" class=""><div class="m_4451eb3a mantine-Center-root"><img style="opacity:0.8;width:70%" class="m_9e117634 mantine-Image-root mantine-visible-from-xs" src="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NDAxNiwicHVyIjoiYmxvYl9pZCJ9fQ==--eb66b9b5e26fafa32844ce0f4522c3ed84544040/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Hand%20coding-rafiki.png" alt="СИКП на Java" loading="eager"/></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:end;--group-justify:space-between;--group-wrap:wrap;margin-top:var(--mantine-spacing-xs)" class="m_4081bf90 mantine-Group-root"><p style="font-size:var(--mantine-font-size-xl)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">от 3 900 ₽</p><p style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Посмотреть →</p></div></div></div></a></div></div><div class="m_d98df724 mantine-Carousel-slide" data-orientation="horizontal"><div tabindex="0" style="cursor:pointer;height:100%"><a style="text-decoration:none" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/programs/fullstack-java?promo_name=programs_list&promo_position=qna_question&promo_creative=catalog_card&promo_type=card" target="_blank"><div style="height:100%" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true"><div style="--group-gap:calc(0.25rem * var(--mantine-scale));--group-align:center;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">16 месяцев</span><span class="mantine-focus-auto m_b6d8b162 mantine-Text-root">·</span><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">С нуля</span></div><p style="margin-bottom:var(--mantine-spacing-sm);font-size:var(--mantine-font-size-h5);font-weight:bold" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Fullstack-разработчик на Java</p><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root"></p><div style="margin-top:auto" class=""><div class="m_4451eb3a mantine-Center-root"><img style="opacity:0.8;width:70%" class="m_9e117634 mantine-Image-root mantine-visible-from-xs" src="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzY3MSwicHVyIjoiYmxvYl9pZCJ9fQ==--ca5a6047d43e5c0f6d07b52e845817fa2c47ef02/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20typing-bro.png" alt="Fullstack-разработчик на Java" loading="eager"/></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:end;--group-justify:space-between;--group-wrap:wrap;margin-top:var(--mantine-spacing-xs)" class="m_4081bf90 mantine-Group-root"><p style="font-size:var(--mantine-font-size-xl)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">от 7 934 ₽</p><p style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Посмотреть →</p></div></div></div></a></div></div><div class="m_d98df724 mantine-Carousel-slide" data-orientation="horizontal"><div tabindex="0" style="cursor:pointer;height:100%"><a style="text-decoration:none" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/programs/spring-boot?promo_name=programs_list&promo_position=qna_question&promo_creative=catalog_card&promo_type=card" target="_blank"><div style="height:100%" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true"><div style="--group-gap:calc(0.25rem * var(--mantine-scale));--group-align:center;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">1 месяц</span><span class="mantine-focus-auto m_b6d8b162 mantine-Text-root">·</span><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Для продвинутых</span></div><p style="margin-bottom:var(--mantine-spacing-sm);font-size:var(--mantine-font-size-h5);font-weight:bold" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Spring Boot</p><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Навык работы с Spring Boot для масштабируемых веб-приложений</p><div style="margin-top:auto" class=""><div class="m_4451eb3a mantine-Center-root"><img style="opacity:0.8;width:70%" class="m_9e117634 mantine-Image-root mantine-visible-from-xs" src="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6MzY3NSwicHVyIjoiYmxvYl9pZCJ9fQ==--b3b44cb29727c1bcb0b9aee0c285371dc12aa50f/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20typing-pana.png" alt="Spring Boot" loading="eager"/></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:end;--group-justify:space-between;--group-wrap:wrap;margin-top:var(--mantine-spacing-xs)" class="m_4081bf90 mantine-Group-root"><p style="font-size:var(--mantine-font-size-xl)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">от 3 900 ₽</p><p style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Посмотреть →</p></div></div></div></a></div></div><div class="m_d98df724 mantine-Carousel-slide" data-orientation="horizontal"><div tabindex="0" style="cursor:pointer;height:100%"><a style="text-decoration:none" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/programs/java-basics-free?promo_name=programs_list&promo_position=qna_question&promo_creative=catalog_card&promo_type=card" target="_blank"><div style="height:100%" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true"><div style="--group-gap:calc(0.25rem * var(--mantine-scale));--group-align:center;--group-justify:flex-start;--group-wrap:nowrap" class="m_4081bf90 mantine-Group-root"><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">1 месяц</span><span class="mantine-focus-auto m_b6d8b162 mantine-Text-root">·</span><span style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">С нуля</span></div><p style="margin-bottom:var(--mantine-spacing-sm);font-size:var(--mantine-font-size-h5);font-weight:bold" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Основы Java</p><p class="mantine-focus-auto m_b6d8b162 mantine-Text-root"></p><div style="margin-top:auto" class=""><div class="m_4451eb3a mantine-Center-root"><img style="opacity:0.8;width:70%" class="m_9e117634 mantine-Image-root mantine-visible-from-xs" src="https://hexlet.io/rails/active_storage/representations/proxy/eyJfcmFpbHMiOnsiZGF0YSI6NDAxMywicHVyIjoiYmxvYl9pZCJ9fQ==--2d7c85c58ffeed73b7a953a01db194b8932851d2/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJ3ZWJwIiwicmVzaXplX3RvX2xpbWl0IjpbNDAwLDQwMF0sInNhdmVyIjp7InF1YWxpdHkiOjg1fX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--5b6f46dacd1af664f27558553a58076185091823/Code%20snippets-cuate.png" alt="Основы Java" loading="eager"/></div><div style="--group-gap:var(--mantine-spacing-md);--group-align:end;--group-justify:space-between;--group-wrap:wrap;margin-top:var(--mantine-spacing-xs)" class="m_4081bf90 mantine-Group-root"><p style="font-size:var(--mantine-font-size-xl)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Бесплатно</p><p style="font-size:var(--mantine-font-size-sm)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Посмотреть →</p></div></div></div></a></div></div><div class="m_d98df724 mantine-Carousel-slide" data-orientation="horizontal"><div tabindex="0" style="cursor:pointer;height:100%"><a style="text-decoration:none" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/courses?promo_name=programs_list&promo_position=qna_question&promo_creative=catalog_card&promo_type=card"><div style="height:100%" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root" data-with-border="true"><h2 style="--title-fw:var(--mantine-h2-font-weight);--title-lh:var(--mantine-h2-line-height);--title-fz:var(--mantine-h2-font-size);margin-bottom:var(--mantine-spacing-md);font-size:var(--mantine-font-size-h3)" class="m_8a5d1357 mantine-Title-root" data-order="2" data-responsive="true">Каталог</h2><p style="margin-bottom:auto" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Полный список доступных курсов по разным направлениям</p><div style="margin-top:auto" class=""><div class="m_4451eb3a mantine-Center-root"><img style="opacity:0.8;width:70%" class="m_9e117634 mantine-Image-root mantine-visible-from-xs" src="/vite/assets/development-BVihs_d5.png" alt="Orientation"/></div></div></div></a></div></div></div></div></div></div><style data-mantine-styles="inline">.__m__-_R_5diub_{--col-flex-grow:auto;--col-flex-basis:100%;--col-max-width:100%;}@media(min-width: 48em){.__m__-_R_5diub_{--col-flex-grow:auto;--col-flex-basis:16.666666666666668%;--col-max-width:16.666666666666668%;}}@media(min-width: 62em){.__m__-_R_5diub_{--col-flex-grow:auto;--col-flex-basis:33.333333333333336%;--col-max-width:33.333333333333336%;}}</style><div class="m_96bdd299 mantine-Grid-col __m__-_R_5diub_ mantine-visible-from-md"><div style="justify-content:end;margin-top:0rem;position:sticky;top:calc(5rem * var(--mantine-scale))" class="m_8bffd616 mantine-Flex-root __m__-_R_1bddiub_"><div tabindex="0" style="cursor:pointer"><a style="text-decoration:none" class="mantine-focus-auto m_849cf0da m_b6d8b162 mantine-Text-root mantine-Anchor-root" data-underline="hover" href="/courses_web_development?promo_name=program_category&promo_position=qna_question&promo_creative=card&promo_type=card"><div style="background-color:var(--mantine-color-default);border:calc(0.0625rem * var(--mantine-scale)) solid var(--mantine-color-default-border);padding-inline:var(--mantine-spacing-xl);padding-top:var(--mantine-spacing-xl);padding-bottom:var(--mantine-spacing-xs);width:100%" class="m_e615b15f mantine-Card-root m_1b7284a3 mantine-Paper-root"><div class="m_4451eb3a mantine-Center-root" data-inline="true"><p style="font-size:var(--mantine-font-size-h4)" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Курсы по веб-разработке</p></div><img class="m_9e117634 mantine-Image-root" src="/vite/assets/development-BVihs_d5.png"/><p style="margin-bottom:var(--mantine-spacing-xs);text-align:right" class="mantine-focus-auto m_b6d8b162 mantine-Text-root">Посмотреть →</p></div></a></div></div></div></div></div></div></div>
</main>
<footer class="bg-dark fw-light text-light px-3 py-5">
<div class="row small">
<div class="col-12 col-sm-6 col-md-3">
<div class="h5 mb-3">Хекслет</div>
<ul class="list-unstyled">
<li>
<a class="nav-link link-light py-1 ps-0" href="/pages/about">О нас</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/testimonials">Отзывы</a>
</li>
<li>
<span class="nav-link link-light py-1 ps-0 external-link" data-href="https://b2b.hexlet.io" role="button">Корпоративное обучение</span>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/blog">Блог</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/qna">Вопросы и ответы</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/glossary">Глоссарий</a>
</li>
<li>
<span class="nav-link link-light py-1 ps-0 external-link" data-href="https://help.hexlet.io" data-target="_blank" role="button">Справка</span>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" target="_blank" rel="noopener noreferrer" href="/map">Карта сайта</a>
</li>
</ul>
</div>
<div class="col-12 col-sm-6 col-md-3">
<div class="h5 fw-normal mb-3">Направления</div>
<ul class="list-unstyled">
<li>
<a class="nav-link link-light py-1 ps-0" href="/courses_devops">DevOps
</a></li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/courses_data_analytics">Аналитика
</a></li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/courses_backend_development">Бэкенд
</a></li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/courses_programming">Программирование
</a></li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/courses_testing">Тестирование
</a></li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/courses_front_end_dev">Фронтенд
</a></li>
</ul>
</div>
<div class="col-12 col-sm-6 col-md-3">
<div class="h5">Профессии</div>
<ul class="list-unstyled">
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/devops-engineer-from-scratch">DevOps-инженер с нуля</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/go">Go-разработчик</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/java">Java-разработчик</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/python">Python-разработчик </a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/data-analytics">Аналитик данных</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/qa-engineer">Инженер по ручному тестированию</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/php">РНР-разработчик</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/frontend">Фронтенд-разработчик</a>
</li>
</ul>
</div>
<div class="col-12 col-sm-6 col-md-3">
<div class="h5">Навыки</div>
<ul class="list-unstyled">
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/python-django-developer">Django</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/docker">Docker</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/php-laravel-developer">Laravel</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/postman">Postman</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/js-react-developer">React</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/js-rest-api">REST API в Node.js</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/spring-boot">Spring Boot</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/programs/typescript">Typescript</a>
</li>
</ul>
</div>
</div>
<hr>
<div class="row">
<div class="col-12 col-sm-4 col-md-2">
<div class="fs-4">
<ul class="list-unstyled d-flex">
<li class="me-3">
<a aria-label="Telegram" target="_blank" class="link-light" rel="noopener noreferrer nofollow" href="https://t.me/hexlet_ru"><span class="bi bi-telegram"></span>
</a></li>
<li>
<a aria-label="Youtube" target="_blank" class="link-light" rel="noopener noreferrer nofollow" href="https://www.youtube.com/user/HexletUniversity"><span class="bi bi-youtube"></span>
</a></li>
</ul>
</div>
<div class="mb-2 d-flex flex-column">
<a class="link-light text-decoration-none" rel="nofollow" href="mailto:support@hexlet.io">support@hexlet.io</a>
<a class="link-light text-decoration-none py-2" target="_blank" href="https://t.me/hexlet_help_bot">t.me/hexlet_help_bot</a>
</div>
<ul class="list-unstyled d-flex">
<li class="me-3">
<span class="link-light text-decoration-none opacity-50 x-font-size-18 external-link" rel="nofollow" data-href="https://hexlet.io/locale/switch?new_locale=en" data-target="_self" role="button"><span class="my-auto">EN</span>
</span></li>
<li class="me-3">
<span class="link-light text-decoration-none opacity-50 x-font-size-18 opacity-100 external-link" rel="nofollow" data-href="https://ru.hexlet.io/locale/switch?new_locale=ru" data-target="_self" role="button"><span class="my-auto">RU</span>
</span></li>
<li class="me-3">
<span class="link-light text-decoration-none opacity-50 x-font-size-18 external-link" rel="nofollow" data-href="https://kz.hexlet.io/locale/switch?new_locale=kz" data-target="_self" role="button"><span class="my-auto">KZ</span>
</span></li>
</ul>
</div>
<div class="col-12 col-sm-4 col-md-3">
<ul class="list-unstyled fs-4">
<li class="mb-3">
<a class="link-light text-decoration-none" href="tel:8%20800%20100%2022%2047">8 800 100 22 47</a>
<span class="d-block opacity-50 small">бесплатно по РФ</span>
</li>
<li>
<a class="link-light text-decoration-none" href="tel:%2B7%20495%20085%2021%2062">+7 495 085 21 62</a>
<span class="d-block opacity-50 small">бесплатно по Москве</span>
</li>
</ul>
</div>
<div class="col-12 col-sm-4 col-md-3">
<div class="small mb-3">Образовательные услуги оказываются на основании Л035-01298-77/01989008 от 14.03.2025</div>
<ul class="list-unstyled small">
<li>
<a class="nav-link link-light py-1 ps-0" href="/pages/legal">Правовая информация</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/pages/offer">Оферта</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/pages/license">Лицензия</a>
</li>
<li>
<a class="nav-link link-light py-1 ps-0" href="/pages/contacts">Контакты</a>
</li>
</ul>
</div>
<div class="col-12 col-sm-12 col-md-4 small">
<div class="mb-2">
<div>ООО «<a href="/" class="text-decoration-none link-light">Хекслет Рус</a>»</div>
<div>108813 г. Москва, вн.тер.г. поселение Московский,</div>
<div>г. Московский, ул. Солнечная, д. 3А, стр. 1, помещ. 20Б/3</div>
<div>ОГРН 1217300010476</div>
<div>ИНН 7325174845</div>
</div>
<hr>
<div>АНО ДПО «<a href="/" class="text-decoration-none link-light">Учебный центр «Хекслет</a>»</div>
<div>119331 г. Москва, вн. тер. г. муниципальный округ</div>
<div>Ломоносовский, пр-кт Вернадского, д. 29</div>
<div>ОГРН 1247700712390</div>
<div>ИНН 7736364948</div>
</div>
</div>
</footer>
<div id="root-assistant-offcanvas"></div>
<script src="/vite/assets/assistant-Bukl1lYy.js" crossorigin="anonymous" type="module"></script><link rel="modulepreload" href="/vite/assets/chunk-DsPFFUou.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/init-BrRXra1y.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/ErrorFallbackBlock-naDSYSy9.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/MarkdownBlock-DbyKWoR_.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/gon-D3e4yh1x.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/mantine-CGMYrt2Y.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/shiki-V011pkdv.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/utils-DRqSHbQE.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/routes-CCH8ilKF.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/lib-XR8Qr8kR.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/dist-GCHh59xr.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/Box-B5-OOzBf.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/notifications.store-C-3AFSMn.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/useIsomorphicEffect-HJ6VK0D3.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/lib-KSp6QbZ0.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/axios-BEvgo0ym.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/classnames-l6ipYlLR.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/dayjs.min-BkKovM-s.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/debounce-jMQ_Cf4f.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/i18next-BlSq9s7B.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/client-U9M77rxp.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/react-dom-DaLxUz_h.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/useTranslation-Bx1Cdrkz.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/compiler-runtime-6XxiPFnt.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/jsx-runtime-CwjcCKJi.js" as="script" crossorigin="anonymous">
<link rel="modulepreload" href="/vite/assets/react-CkL4ZRHB.js" as="script" crossorigin="anonymous">
<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v67327c56f0bb4ef8b305cae61679db8f1769101564043" integrity="sha512-rdcWY47ByXd76cbCFzznIcEaCN71jqkWBBqlwhF1SY7KubdLKZiEGeP7AyieKZlGP9hbY/MhGrwXzJC/HulNyg==" data-cf-beacon='{"version":"2024.11.0","token":"d11015b65d11429ea6b4a2ef37dd7e0b","server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}' crossorigin="anonymous"></script>
</body>
</html>