Click here to Skip to main content
15,913,939 members
Home / Discussions / Java
   

Java

 
AnswerRe: Block desktop until app running? Pin
Nagy Vilmos22-Feb-11 1:45
professionalNagy Vilmos22-Feb-11 1:45 
AnswerRe: Block desktop until app running? Pin
TorstenH.23-Feb-11 20:07
TorstenH.23-Feb-11 20:07 
AnswerRe: Block desktop until app running? Pin
jschell24-Feb-11 11:59
jschell24-Feb-11 11:59 
GeneralRe: Block desktop until app running? Pin
Alok Sharma ji24-Feb-11 20:32
Alok Sharma ji24-Feb-11 20:32 
QuestionRecursion:Delete from a linkedList Pin
Brian Robertson21-Feb-11 22:08
Brian Robertson21-Feb-11 22:08 
AnswerRe: Recursion:Delete from a linkedList Pin
Nagy Vilmos22-Feb-11 1:44
professionalNagy Vilmos22-Feb-11 1:44 
AnswerRe: Recursion:Delete from a linkedList Pin
David Skelly22-Feb-11 1:50
David Skelly22-Feb-11 1:50 
QuestionPalindrome assignment Pin
Chuon Visoth21-Feb-11 14:04
Chuon Visoth21-Feb-11 14:04 
Dear programmers,

I am a new student of CS, I am learning Java on Eclipse. I have an assignment which to reverse an input text - it is called palindrome. I coded but errors, I wonder if you all can help me as I do not even know that what wrong with this code.

public class firstsubroutine {
	public static void main (String[] args){
	    
        TextIO.putln("Enter the palindrome : ");
        TextIO.put("? ");
        String line = TextIO.getln();    
        line = line.toLowerCase();

        if (isString(line) = true){
            reverse(line);
            String reversed = reverse(line);
            if (line == reversed){
                System.out.println ("Stripped : " + line);
                System.out.println ("Reversed : " + reversed);
                System.out.println ("This IS a palindrome.");
            }
            else{
                System.out.println ("Stripped : " + line);
                System.out.println ("Reversed : " + reversed);
                System.out.println ("This is NOT a palindrome.");
        }
        }  
    }

    // isString subroutine
    
    static void isString (String isStr){
    
        int i;
        boolean isBoolean;
        
        for (i = 0; i < isStr.length(); i++){
            char ch =  isStr.charAt(i);
            if (Character.isLetter(ch)){
                isBoolean = true;        
            }
            else{
                isBoolean = false;
            }
        }
    }
    
    // reverse subroutine
    
    static void reverse(String reStr){
    
        int i;
        String reverse = "";
        for (i = reStr.length() - 1; i >= 0; i++){
            reverse = reverse + reStr.charAt(i);
        }
    }
}

AnswerRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:21
shivamkalra21-Feb-11 15:21 
GeneralRe: Palindrome assignment Pin
Chuon Visoth21-Feb-11 15:36
Chuon Visoth21-Feb-11 15:36 
GeneralRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:41
shivamkalra21-Feb-11 15:41 
GeneralRe: Palindrome assignment Pin
Chuon Visoth21-Feb-11 15:45
Chuon Visoth21-Feb-11 15:45 
GeneralRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:48
shivamkalra21-Feb-11 15:48 
GeneralRe: Palindrome assignment Pin
Chuon Visoth21-Feb-11 15:50
Chuon Visoth21-Feb-11 15:50 
GeneralRe: Palindrome assignment Pin
shivamkalra21-Feb-11 15:54
shivamkalra21-Feb-11 15:54 
AnswerRe: Palindrome assignment Pin
TorstenH.21-Feb-11 20:48
TorstenH.21-Feb-11 20:48 
GeneralRe: Palindrome assignment Pin
Chuon Visoth23-Feb-11 13:37
Chuon Visoth23-Feb-11 13:37 
GeneralRe: Palindrome assignment Pin
TorstenH.23-Feb-11 19:34
TorstenH.23-Feb-11 19:34 
QuestionDeveloping Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
eight20-Feb-11 16:23
eight20-Feb-11 16:23 
AnswerRe: Developing Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
Richard MacCutchan21-Feb-11 0:47
mveRichard MacCutchan21-Feb-11 0:47 
GeneralRe: Developing Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
eight21-Feb-11 16:22
eight21-Feb-11 16:22 
GeneralRe: Developing Lotus Notes Plugin : What does "navigate to the JRE in the Notes installation folder" means? Pin
Richard MacCutchan21-Feb-11 21:54
mveRichard MacCutchan21-Feb-11 21:54 
QuestionUtility calling Java application Pin
Indrojeet18-Feb-11 20:17
Indrojeet18-Feb-11 20:17 
AnswerRe: Utility calling Java application Pin
jschell19-Feb-11 9:10
jschell19-Feb-11 9:10 
GeneralRe: Utility calling Java application Pin
Indrojeet20-Feb-11 17:47
Indrojeet20-Feb-11 17:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.