Results 1 to 4 of 4
  1. #1
    infolooking is offline Member
    Join Date
    May 2016
    Posts
    1
    Rep Power
    0

    Question unmanglePassword

    Hello,

    I am trying to unmangle Password. i tried this, but not sure how to call unmanglePassword method from main method passing the password

    import java.util.*;
    import java.io.*;
    import java.lang.Object;
    import com.tibco.tibjms.admin.TibjmsAdmin;


    public class test {

    public static java.lang.String unmanglePassword(java.lang.String mangledPassword)
    {
    return string;}

    public static void main(String[] args) {
    // TODO Auto-generated method stub




    }
    }

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,995
    Rep Power
    9

    Default Re: unmanglePassword

    In the main-method you can type the name of the method as-is, because they are both static, so it would look like this:
    Java Code:
    public class Test {
       public static String unmanglePassword(String mangledPassword) {
           //do something with mangledPassword here and return the result: the unmangled password
           return yourUnmangledPassword;
       }
    
       public static void main(String[] args) {
          //call the method here and store the returned value in a variable:
          String result = unmanglePassword( "VeryDiffcultPasswordHere123");
       }
    }
    Tip: you All java.lang classes (and others) are imported by default, so you don't need to import java.lang.Object or fully qualify java.lang.String.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  3. #3
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: unmanglePassword

    I moved this thread because there's nothing advanced about it.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  4. #4
    Join Date
    May 2016
    Location
    Brazil
    Posts
    16
    Rep Power
    0

    Default Re: unmanglePassword

    Put your code under CODE tags like @Surfman did, it helps a lot reading it.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •