Java Forum

 Forum:   Subject:  View:  

 

 Blue Pelican Site
 Login/Edit Account


 Forgot your password?

 

     (Page 3 of 5)
<Prv  1  2  3 4  5  Nxt>  

Topic: how you do this one?
ID: nana Date/Time: 02/19/2007 11:07:17 AM
Message:
i had a question like this on the test last week, but i couldnt figure out how to do this?
the question is SET A CODE BETWEEN 1 TO 100, AND 5 VALUE PER LINE, EACH VALUE HAS SOME SPACE.
can you help me  
Reply Title: Try This  
ID: JavaCode Date/Time: 02/11/2011 11:23:19 AM
Message:
public class Tester
{
   public static void main(String args[])
   {
      String num1;
      For (num1=1,num<101,num1+=5)
      System.out.println(num1);
}
}

\\ P.S. sorry i'm 4 years late

Topic: Encryption/Decryption
ID: ShurikenBandit Date/Time: 10/15/2007 7:31:45 PM
Message:
This project has me stuck. I can't figure out how to get it right. This is what I have right now for the encryption method:

public String encrypt(String s)
    {
        s = s.replace("v","ag',r");
        s = s.replace("m","ssad");
        s = s.replace("g","jeb..w");
        s = s.replace("b","dug>?/");
        return s;
       }

Please, if anyone can show me the correct code for this I would be grateful.
Reply Title: i think this is the answer  
ID: CombatBoots Date/Time: 10/23/2007 11:10:12 AM
Message:
When you replace a "v" you put a "g" in the String.  Then you replace that new "g" with "jeb..w".
Any "g" is then replaced with "jeb..w", which have a "b", so that is replaced with "dug>?/".

EX: "strive" > "striajedug>?/..w',re"

Just by changing the order most of these problems could be solved, except there is a "g" int the "b" and a "b" in the "g" meaning regardless of order these would mess up.

Topic: Connect to pin in hardware port
ID: Marqu Date/Time: 07/14/2008 1:20:27 AM
Message:
hi,
I like to connect to special pin like pin12 and send binary data to the special pin in serial port. or want to check for pins in PCMCIA modem connected to my computer, can i seperate data to take output in this format
Eg.
Extracting Data from PCMCIA/SERIAL hardware device
in 01 msecond
pin 1 is flowing 1
pin 2 is flowing 0
pin 3 is flowing 1
pin 4 is flowing 1
pin 5 is flowing 1
...
in 02 msecond
pin 1 is flowing 0
pin 2 is flowing 0
pin 3 is flowing 1
pin 4 is flowing 0
pin 5 is flowing 1
...
etc ?
or checking flow of data in pins
pin 1 is flowing 1001010111 ..
pin 2 is flowing 01111110111 ...
pin 3 is flowing 1011010101 ...

?
hope you got it.
Please help me to know what my  hardware is receiving . From JAVA

Topic: Demonstrate a design pattern using Java
ID: lee Date/Time: 08/09/2008 9:02:42 PM
Message:
Hi..
I need to demonstrate a design pattern using a java program I create and explain how the program I create illustrates the pattern.
Thanks.

Topic: Help with Add'em Right Project "Arrays"
ID: aaa Date/Time: 11/06/2008 7:33:34 PM
Message:
i read through the lesson and got some code, but im having trouble doing forming the while loop thats suppose to go with it.


Topic: hi
ID: Darvus Date/Time: 12/05/2008 8:54:00 PM
Message:
is there anyone who is really good at this? i would like some help; :)

Topic: advanced string methods
ID: T0209 Date/Time: 02/24/2009 2:25:06 PM
Message:
I receive an error when I go to compile this code(the error is "reached end of file while parsing") Why am I getting this error and how do I fix it?:

public class Crypto
{
   public String encrypt(String sntnc)
   {
       String finalSntnc = "";
       
       for(int j = 0; j < sntnc.length( ); j++)
       {
           char nextChar = sntnc.charAt(j);
           switch (nextChar)
           {
               case 'v':
               case 'V':
               {
                   finalSntnc = finalSntnc + "ag\',r";
                   break;
               }
               
               case 'm':
               case 'M':
               {
                   finalSntnc = finalSntnc +"saad";
                   break;
               }
         case 'g':
               case 'G':
               {
                   finalSntnc = finalSntnc + "jeb..w";
                   break;
               }
               
               case 'b':
               case 'B':
               {
                   finalSntnc = finalSntnc + "dug>?/";
                   break;
               }
               
               default:
               {
                   finalSntnc = finalSntnc + nextChar;
               }
           }
           return finalSntnc;
   
   }
}

public String decrypt(String sntnc)
{
   sntnc = sntnc.replace("ag\',r","v");
   sntnc = sntnc.replace("saad", "m");
   sntnc = sntnc.replace("jeb..w", "g");
   sntnc = sntnc.replace("dug>?/", "b");
   return sntnc;

}
Reply Title: problem solved  
ID: JavaCode Date/Time: 02/11/2011 10:52:39 AM
Message:
all the way at the end of your code you need another brace "}" on the last line

Topic: Lesson 18 Project: Count 'em Right
ID: semi-javaprogrammer Date/Time: 02/27/2010 7:26:51 PM
Message:
Please help me with the whole subject matter of lesson 18. First, I don't understand what you are asking.  Second, the book is poorly worded, making it even more difficult to understand how to count occurences of a specific delimiter.  If anyone could walk me through this project that would be great.

Topic: Planning Tools
ID: bballin Date/Time: 11/21/2010 7:49:41 PM
Message:
I was wondering if you put a guide to any planning tools such as :
UML Diagrams
Psuedo-Code
Flow Charts
Algorithms

If so could you tell me where i have your book though and can not find anything on it.

Thank you
                      
  << New message thread

(Page 3 of 5)             <<PrevPage   1   2   3   4   5   NextPage>>  

This Forum automated by software from bluepelicanjava.com