# Syntax conversion between C++ or Java to Ruby

**URL:** <https://www.ruby-forum.com/t/syntax-conversion-between-c-or-java-to-ruby/107384>\
**Category:** Rails\
**Created:** [June 21, 2007, 2:58am UTC](https://www.ruby-forum.com/t/syntax-conversion-between-c-or-java-to-ruby/107384 "2007-06-21T02:58:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [June 21, 2007, 2:58am UTC](https://www.ruby-forum.com/t/syntax-conversion-between-c-or-java-to-ruby/107384/1 "2007-06-21T02:58:05Z")

</div>

Can anyone recommend a good web site that shows Ruby equivalents of  
common C++ or Java constructs. For example

1. while, for loops
2. private, protected, public

A table would be good…

Any good sites to migrate from the Java language (not web framework)  
to the Ruby language (not Rails)

Thanks!  
Chirag

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [June 21, 2007, 4:30am UTC](https://www.ruby-forum.com/t/syntax-conversion-between-c-or-java-to-ruby/107384/2 "2007-06-21T04:30:11Z")

</div>

chirag wrote:

> Thanks!  
> Chirag

Hi Chirag,

It’s not a table like you ask but what I found useful was to read Chris  
Pine’s “How to Program” that teaches you programming with Ruby. I have  
used C for nearly 12 years, so some of the book was rather simple, but  
it gave me (quite quickly) the exact introductory class that I needed.  
It took me through all the basic concepts like what you ask in a thin  
concise manner.

Cheers,  
Mohit.  
6/21/2007 | 10:29 AM.

---

<div class="post-metadata">

**Author:** ![chirag](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/ecccb3/32.png) [@chirag](https://www.ruby-forum.com/u/chirag)\
**Post date:** [June 21, 2007, 5:25am UTC](https://www.ruby-forum.com/t/syntax-conversion-between-c-or-java-to-ruby/107384/3 "2007-06-21T05:25:13Z")

</div>

On Jun 20, 2007, at 8:57 PM, chirag wrote:

> Can anyone recommend a good web site that shows Ruby equivalents of  
> common C++ or Java constructs. For example

[http://www.ruby-doc.org/docs/ProgrammingRuby/](http://www.ruby-doc.org/docs/ProgrammingRuby/)

-faisal
