Skip to content

Instantly share code, notes, and snippets.

A palindrome is a string that reads the same forward and backward. In Java, you can check if a string is a palindrome by comparing the characters from the beginning and the end of the string, moving towards the center. Here's a simple example of how to implement this:

import java.util.Scanner;

public class PalindromeChecker {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

To add two numbers, simply combine their values. For example, if you want to add 5 and 3:

[ 5 + 3 = 8 ]

If you have specific numbers you'd like to add, please provide them, and I can help with the calculation!

Powered by https://www.blackbox.ai

import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import Main from "./containers/Main";
import InfoMessage from "./components/InfoMessage";
import { initTodoListState } from "./store/actions";
import { getLocalStorageTodoState } from "./util";
class App extends React.Component {
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import Main from "./containers/Main";
import InfoMessage from "./components/InfoMessage";
import { initTodoListState } from "./store/actions";
import { getLocalStorageTodoState } from "./util";
class App extends React.Component {
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import Main from "./containers/Main";
import InfoMessage from "./components/InfoMessage";
import { initTodoListState } from "./store/actions";
import { getLocalStorageTodoState } from "./util";
class App extends React.Component {
@sagar676
sagar676 / OverlayView.java
Created October 6, 2021 20:05 — forked from acidsound/OverlayView.java
SurfaceView Example
import java.io.IOException;
import java.util.List;
import android.content.Context;
import android.hardware.Camera;
import android.hardware.Camera.Size;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceHolder.Callback;
import android.view.SurfaceView;
@sagar676
sagar676 / MiddleDividerItemDecoration.java
Created April 12, 2021 12:23 — forked from nuovothoth/MiddleDividerItemDecoration.java
java version of Veeyikpong/MiddleDividerItemDecoration.kt
/*
* Copyright 2018 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@sagar676
sagar676 / AttachmentUploader.kt
Created January 2, 2021 06:45 — forked from lordcodes/AttachmentUploader.kt
Code for the article: "Uploading a file with progress in Kotlin"
fun uploadAttachment(
filename: String, file: File, mimeType: String
): Observable<AttachmentUploadRemoteResult> {
val progressEmitter = PublishSubject.create<Double>()
val uploadRequest = createUploadRequest(
filename, file, mimeType, progressEmitter
)
val uploadResult = uploadRequest
.map<AttachmentUploadRemoteResult> {