Sunday, September 30, 2007

Master ASP.NET 2.0 Web Development with SitePoint's Latest Book

Frustrated by the abundance of thousand-page ASP.NET reference monstrosities on the market, sitepoint.com has joined forces with five world-class ASP.NET developers to create a book that gets straight to the heart of solving ASP.NET problems.

The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks will save you time, and eliminate the frustration of completing ASP.NET programming tasks, with a comprehensive collection of fully-tested and ready-to-use C# solutions.

This focused, easy-to-read book enables you to learn by example as you work through its impressive C# solutions.

Some of the treasures inside this book include:

  • building a database access layer for portability
  • sidestepping the ASP.NET Framework when required
  • adding interactivity with Ajax and JavaScript
  • building data-driven applications quickly with SubSonic
  • handling errors effectively
  • working with email: send, parse, and manage attachments
  • using component-based development for flexibility
  • And lots more ...

Stop wasting time with dry, academic texts; get the job done quickly and easily with this collection of vital C# solutions for ASP.NET developers.

ISBN: 978-0-9802858-1-9
Page Count: 596
Price: $39.95 USD / $51.95 CDN
Book Web Site: http://www.sitepoint.com/books/aspnetant1/

About SitePoint
SitePoint specializes in publishing fun, practical, and easy-to-understand content for web professionals. Its popular online magazine, blogs, newsletters and print books teach best practices to web developers and designers worldwide.
http://www.sitepoint.com/

Source: PRWeb

Codejock Software Introduces Xtreme ToolkitPro and SuitePro 2007 Vol. 2 for Visual Studio .NET

Codejock Software a leading provider of cutting-edge user interface components, today has announced the release of Xtreme Toolkit Pro and Xtreme Suite Pro 2007 Volume 2 for Visual Studio .NET®, providing a comprehensive set of fully customizable user interface components for use with Visual C++ MFC, ActiveX COM and Microsoft.NET development platforms. This release incorporates many new enhancements to the already full featured Codejock product line including:

  • New Vista Style Task Dialog Control for ActiveX: A Windows Vista style Task Dialog control is now included with the SuitePro.
  • Xtreme Controls for ActiveX: ActiveX now includes a Vista style Task Dialog, TreeView, ListView, Hex Edit, Progress Bar, Scroll Bar, Tray Icon, Web Browser, Tip of the Day Dialog, Browse Folder Dialog, Window List Dialog, Masked Edit, Slider and Month Calendar controls.
  • Office 2007 Style HTML Super Tips: HTML tooltips allow valid snippets of HTML to be used to format tip windows.
  • Outlook 2007 Style Calendar Appointment Categories: Categories replace the old appointment labels and there can be several categories set to any appointment.
  • Excel Style Header and Footer Rows: Header and footer rows allows rows in the report to always remain visible at the top and bottom of the report.
  • Multiple In-place Property Grid Buttons: Each property grid item can have several buttons associated to make it easier for users to select data for the item.
  • Tabbed List and Tree View: Tabbed list and Tree view controls have the same functionality as a tab control, only they use an alternative method of navigation.

A great alternative to creating a series of confusing and difficult to understand dialog boxes with the MessageBox API would be to use a Vista Style Task Dialog. With a task dialog all the information a user needs to make an informed decision can be presented to them in an easy to understand and concise format. The design of the task dialog looks better and is much simpler, which improves usability by stating the purpose, providing self-explanatory responses, enabling expandable content for added instructions and rich text support to better layout information.

Xtreme Controls is now available for ActiveX as well as included with Xtreme Suite. ActiveX now includes a Vista style Task Dialog, Tree View, List View, Hex Edit, Progress Bar, Scroll Bar, Tray Icon, Web Browser, Tip of the Day Dialog, Browse Folder Dialog, Window List Dialog, Masked Edit, Slider and Month Calendar control. This comprehensive set of components has been designed to handle most any GUI application development requirement.

Office 2007 style HTML Super Tips allow HTML code snippets to be used to format the tip window. HTML features such as tables, font, color, image and many more can be used to create just about any style of tip needed.

Outlook 2007 style calendar appointment categories are what replaced the old label system. There can be several categories set to any appointment at the same time. Categories make it easy to organize appointments and see what category they belong to by assigning a color to the appointment.

Each property grid item can now have several buttons associated to make it easier for users to select data for the item. For example there might be a button for a drop-down list of image file names and another button to allow a browse folder dialog to open an image file not in the list.

Tabbed list and Tree view controls are just a fancy version of a tab control giving an alternative method of navigation. These use controls that users are already familiar with and put them to use navigating property sheets. The property sheets fully support the SkinFramework.

A complete list of all new features can be found in the release notes for each product, found on the company's website, www.codejock.com.

About Codejock Software

Codejock Software, a division of Codejock Technologies, LLC based in MORRICE, Michigan provides reusable software components that facilitate rapid user interface development using Microsoft® Visual Studio .NET® development platforms. Codejock Software is committed to helping developers realize their goals with cutting-edge components, superior customer service and technical support. Codejock Software's products and evaluation versions are available for download on the company's website, for more information visit www.codejock.com.

Source: PRWeb

Sunday, September 23, 2007

Free eBooks from Apress

Apress has made a number of their books available as free ebooks. Here is a current list of the free ebooks available:

  • Practical Common Lisp
  • Enterprise Java Development on a Budget: Leveraging Java Open Source Technologies
  • Beginning J2EE 1.4: From Novice to Professional
  • Google, Amazon, and Beyond: Creating and Consuming Web Services
  • Pro JSP, Third Edition
  • Writing Perl Modules for CPAN
  • XML Programming: Web Applications and Web Services With JSP and ASP
  • COM and .NET Interoperability
  • Programming VB .NET: A Guide For Experienced Programmers
  • A Programmer's Introduction to PHP 4.0

These ebooks are available to download for free in PDF format from the Apress web site.

Saturday, September 22, 2007

Determine if a Year is a Leap Year in Java

Java provides an easy mechanism to determine if a specific year is a leap year. This tutorial shows how you how.

To determine if a year is a leap year, you first need to create an instance of a GregorianCalendar. Once you have an instance, you can ask if a specific year is leap year. The following is an example:

//Create a calendar
GregorianCalendar calendar = new GregorianCalendar();

//Determine if a year is a leap year
boolean isLeapYear = calendar.isLeapYear(2008);

In our next example, we show how to determine if the current year is a leap year.

//Create a calendar
GregorianCalendar calendar = new GregorianCalendar();

//Determine if the current year is a leap year
int currentYear = calendar.get(Calendar.YEAR);
boolean isLeapYear = calendar.isLeapYear(currentYear);

Split a String into an Array in Java

Do you need to split a string into multiple values? Prior to Java 1.4, you would probably have used the StringTokenizer class to accomplish this.

In Java 1.4, Sun added a split() method to the String class. Using this method, you can very easily split a String into multiple values. The split() method takes a regular expression as a parameter which is used to split the String.

Below is an example of splitting a String:

//Data String
String data = "value 1,value 2,value 3";

//Split data into an array
String[] values = data.split(",");

Learn JavaScript From Scratch with SitePoint's "Simply JavaScript"

In 2001 Kevin Yank brought PHP and MySQL into the lives of tens of thousands of developers with his definitive book, Build Your Own Database Driven Website Using PHP & MySQL.

Now, with co-author and JavaScript guru Cameron Adams, Kevin's doing the same for JavaScript with the official release of Simply JavaScript from SitePoint (http://www.sitepoint.com/).

Beautifully presented in full color, Simply JavaScript not only teaches JavaScript with unprecedented clarity, it does so with a sense of humor -- it's guaranteed to keep you entertained.

Perfect for first-time JavaScript coders or individuals looking to improve their programming skills, Kevin and Cameron will guide you through the JavaScript programming basics, as well as provide practical solutions to real-world problems.

Simply JavaScript will teach you how to:

  • Use JavaScript's built-in functions, methods, and properties
  • Change the content of web pages using the DOM.
  • Use JavaScript to respond to user actions.
  • Create animations that bring a web site to life.
  • Build forms that validate entries and interact with users.
  • Build a richer user experience with Ajax.
  • Explore the amazing things that JavaScript makes possible.

The JavaScript code used to create each of the components in the book is available for download, and is guaranteed to be simple, efficient, best practice, and ready to use in your own web site.

Simply JavaScript co-author and SitePoint technical director Kevin Yank is extremely proud of his new book: "We knew from the beginning that it wasn't worth writing another beginner's JavaScript book unless we could produce something really special, and we definitely have."

About SitePoint (http://www.sitepoint.com/)

SitePoint specializes in publishing fun, practical, and easy-to-understand content for web professionals. Its popular online magazine, blogs, newsletters, and print books teach best practices to web developers and designers worldwide.

SitePoint also runs the #1 marketplace on the Web for buying and selling web sites, blogs, and forums.http://www.sitepoint.com/marketplace/

Source: PRWeb

Tuesday, September 18, 2007

Komodo 4.2 Updates for Smoother Coding

ActiveState, the leading provider of tools and services for dynamic languages, today released Komodo IDE 4.2, the latest update to the multi-platform, multi-language integrated development environment (IDE) for advanced web development.

Komodo IDE helps free developers to focus on advanced web development.
This release incorporates more useful features like auto-update, necessary features like bug fixes, and nice-to-have features like soft characters, plus improved functionality for dynamic languages.
Key additions to this release are auto updates and soft characters. Auto updates means users don't need to check for the latest features or reinstall Komodo to get the latest version. Soft characters is a new feature for automatic insertion of closing brackets, braces and parentheses.

"I've been a Komodo customer for almost five years, and couldn't imagine using another editor for my work with dynamic languages. Komodo IDE syntax highlights and auto-completes my Perl, Ruby, XML, SQL, HTML and CSS, allowing my team to write better code more quickly than we ever have," said Chris Gerber of Pfizer Global Manufacturing.

"Version 4.1 added Ruby on Rails support that went beyond my expectations, including the ability to create databases directly from the YAML file. With the addition of soft characters and automatic updates in version 4.2, things are only getting better."

As with previous releases, Komodo IDE features intelligent tools for regular expressions, team development, customization and unparalleled extensibility. The result is a powerful coding environment for dynamic languages such as Perl, PHP, Python, Ruby and Tcl and for nclient-side Ajax technologies such as CSS, HTML, JavaScript and XML. A single license covers users across Windows, Mac OS X and Linux.

Today ActiveState also released the latest iteration of Komodo Edit, a free multi-platform, multi-language editor for dynamic languages and Ajax technologies based on the award- winning Komodo IDE. Komodo IDE and Komodo Edit are now available from www.activestate.com.

These releases follow last week's news that ActiveState launched a new initiative to create an open source platform that promotes open standards. The Open Komodo Project will support the open web and web standards, fill a need for developer tools in the open web technology stack, and drive further innovation for Komodo IDE and Komodo Edit. Read more about the Open Komodo Project at www.activestate.com/openkomodo.

About ActiveState
ActiveState creates professional development tools, language distributions, and business solutions for dynamic languages. We focus on building JavaScript, Perl, PHP, Python, Ruby, and Tcl technologies that just work. ActiveState is owned by its employees and Pender Financial Group, a publicly traded investment company focused on technology in British Columbia. For more information, visit www.activestate.com.

Divelements enhances SandDock

Divelements Ltd announces the release of SandDock V3. SandDock brings advanced window management to your applications, making it easy to deal with multiple documents and views in your software by supporting techniques like docking, tabbing and floating for each window. Unparalleled design-time support and a great OO design make this library easy to integrate into your application.

What’s new Summary

*Office 2007 look and feel is fully supported.
*New layout engine ensures consistent window sizing in complex layout hierarchies.
*Window memory greatly improved for moving between the different dock states.
*Layout serialization can now be implemented without writing any code.
*Unpinned windows can now be created at design time.
*Design time user interface for resizing docked windows improved.

Tim Dawson, Technical Director and Owner of Divelements, said: “This exciting release combines a number of features that are often requested. We now supply an Office 2007 theme which fits in seamlessly with our other products, the improved layout engine enforces consistent window layout and memory on a par with Visual Studio .NET, and enhanced design-time support will lead to even greater productivity.”

Pricing and Availability
A fully functional 30-day evaluation copy is available from http://www.divelements.co.uk

SandDock for Windows Forms is priced at $169 per developer, with tiered pricing available for purchases of multiple licenses.

Screenshot - http://www.divelements.co.uk/net/controls/sanddock/screenshots.aspx

About Divelements
Divelements is an established supplier of quality user interface components targeted primarily at the Microsoft .NET platform. We pride ourselves on providing solid, robust components that take full advantage of the rich designer capabilities offered by Visual Studio. Our products are recognized across the industry as offering the rich features demanded by complex applications while retaining a simple, easy to use API and lightweight redistributables.

Saturday, September 8, 2007

Continuent Ships uni/cluster Connector for PostgreSQL and MySQL

Continuent, Inc., the leading provider of commercial open source middleware solutions for database high-availability and scalability, today announced the Continuent uni/clsuter Connector.
Continuent uni/cluster is a suite of middleware software that delivers high-availability and scalability clustering for virtually any mission critical database application.

Continuent uni/cluster Connector is a key part of the Continuent vision of transparent database clustering using off-the-shelf databases and commodity hardware. The Connector allows applications that use MySQL's or PostgreSQL's native database APIs to connect directly to Continuent uni/cluster (uni/cluster for MySQL Enterprise, uni/cluster for PostgreSQL and uni/cluster for EnterpriseDB respectively) without changing libraries or making code alterations.

"Continuent uni/cluster Connector makes database clustering deployments simpler and faster -- customers can focus on deploying the cluster and just switch client connections when they are ready to move." says CTO Robert Hodges anc continues "Another great feature of the Connector is that standard database clients such as 'mysql' and 'psql' can work directly with the cluster. So users preserve not only current client applications but also can continue to use familiar administrative tools as well. Finally, the uni/cluster Connector is fast and consumes few system resources. It minimizes resource impact of deploying Continuent uni/cluster in new environments."

This version of uni/cluster Connector supports all API calls except for use of prepared statements. Continuent is working on these now and expect to provide support in the next release.

Continuent uni/cluster Connector is available in September 2007 and it is free for all Continuent uni/cluster customers. The pricing for Continuent uni/cluster starts at $3,600.

For more information about Continuent products, visit www.continuent.com, and for information on Continuent's involvement in the open source community, visit www.continuent.org.

About Continuent

Continuent increases application reliability by ensuring continuous database availability. Continuent manages a database-neutral, open source database-clustering project Sequoia (www.continuent.org). Continuent also develops and markets commercial Continuent uni/cluster products and services based on Sequoia technology

Continuent's commercial open source solutions are currently available for MySQL® (Continuent uni/cluster for MySQL Enterprise) and PostgreSQL (Continuent uni/cluster for PostgreSQL). Continuent's Sequoia open source solutions are available for Microsoft® SQL Server, Oracle®, IBM® DB2®, and Sybase.

Continuent clustering solutions are designed to provide high-availability and performance scalability services for databases. These solutions are applicable to, and can be transparently added to, a wide range of client/server and internet, especially Web 2.0 applications.

Continuent is headquartered in San Jose, CA, with sales offices in UK and Finland, and a research lab in France. For more information, please visit www.continuent.com.

Source: PRWeb

SQL Farms, Inc Releases Software Packaging and Remote SQL Server Code Deployment Solution for ISVs

SQL Farms, Inc. announced a new database code packaging and remote deployment solution to help software vendors ship projects and deploy database code changes at customer sites, without requiring any remote installations. The new technology is part of SQL Farms' redistributable components and license offerings, which enable ISVs and virtualization providers to deploy updates and collect data from all SQL Server instances and databases in remote networks and data centers.

With SQL Farms' remote deployment solution, software vendors can now develop database code in-house, embed the code in their software releases, and then use SQL Farms' components in their installation packages and software products to automatically push changes to multiple SQL Server databases and instances in remote IT environments. Additional features ALSO allow ISVs to collect data and obtain deployment results from customer sites for verification and debugging purposes.

"In the last six months we were contacted by leading software vendors that heavily rely on Microsoft SQL Server in their product offerings, who asked us to help them push database changes to remote sites," said Dr. Omri Bahat, co-founder and CEO of SQL Farms. He added, "SQL Server environments are growing at a vast rate. Some software vendors use a single database for their application while others use an entire farm of databases and servers. Our new technology offers simple, intuitive, and fully automated deployment solutions that covers all deployment needs and cases, from deploying code to one database on a single client machine to hundreds or thousands of databases and servers across the network."

The redistributable components and licensing are available as part of SQL Farm Combine 1.9, the latest release of SQL Farms' flagship product. Additional redistributable features include agent-less data retrieval and distributed querying capabilities in remote environments, as well as collection of performance metrics from all SQL Servers and instances in remote IT sites and data centers.

About SQL Farms:
SQL Farms, Inc. is a leading provider of tools and frameworks for working with many databases and servers. SQL Farms products are focused on database management, administration, and deployment in mid-size to very large SQL Server environments and data centers. Key features of SQL Farms products include distributed deployment of changes to all databases and servers, collection of data and performance metrics from all servers through distributed querying capabilities, and deployment of admin changes to multiple databases and servers in parallel. SQL Farms tools are based on patent-pending technologies and do not require any remote agents or installations. For additional information please visit SQL Farms website at http://www.sqlfarms.com

Source: PRWeb

Forget Paris in April, Think Atlanta in November for Ruby on Rails Bootcamp, November 12-16, 2007

To meet the rising demand for quality Ruby on Rails training, Big Nerd Ranch, Inc., premier provider of week-long, intensive training classes for web developers, system administrators and programmers, announced the fall dates for Ruby on Rails Bootcamp (http://bignerdranch.com/classes/ruby.shtml) for November 12-16, 2007. The five-day class features Ruby on Rails guru, Charles Brian Quinn (http://bignerdranch.com/instructors/quinn.shtml), and is designed specifically for developers, web designers and project managers charged with the development of robust, efficient and stable database-driven web applications. Students attending this class are not just paying for a simple overview of an over-hyped equivalent of programming bling. Instead, they are thrust head-first into a rigorous study of one of the most elegant and powerful languages and frameworks available to the serious web developer.

Tapping his extensive experience as a full-time Ruby on Rails developer, Charles Brian Quinn presents information within a real-world context, where the introduction of concepts is followed by examples of how those concepts are utilized. In addition, attendees of the class are encouraged to bring their own projects to the class to receive individualized guidance.

"One of the greatest benefits to Ruby on Rails Bootcamp is also one of the more fluid and intangible aspects of the Big Nerd Ranch learning environment," commented Charles Brian Quinn, class instructor. "So much of the learning process occurs after class is over, during the evenings in the lab. That is when students come together for post-class brain dumps, code show-offs and assistance in helping architect their next big application. It is during those late night sessions when many students get their big 'ah ha!' moment."

At the end of the five-day Ruby on Rails training class, students will leave fully schooled in the key elements of Ruby on Rails development, including:

  • Understanding Rails major components: Active Record, ActionPack, ActionMailer and ActiveSupport
  • Understanding Ruby on Rails conventions and the Model View Controller
  • Being able to install, setup, design, develop and deploy Ruby on Rails applications using Capistrano and update and maintain existing Ruby on Rails applications
  • Building, parsing and manipulating XML Documents by generating RSS feeds and creating and consuming Web Services
  • Making sophisticated and dynamic user interfaces utilizing AJAX and using Ruby libraries, plug-ins and generators to enhance extensibility of functionality

No previous experience with Ruby or Rails is required, however, students attending the class should be familiar with basic programming principles such as if/else, methods, objects and data.

The Big Nerd Ranch incorporates intensive training classes for Unix and Mac OS X programmers and system administrators in a retreat setting outside Atlanta, GA. Class price of $3500 includes lodging, all meals, original instruction materials, 24-hour lab access and ground transportation to and from the Atlanta airport. Students are encouraged to bring independent projects to class, allowing for input from classmates and individual instructor attention. For more information, call 678-595-6773 or visit www.bignerdranch.com.

Source: PRWeb

9Rays.Net Announces Release of New Security Software, the CryptoSharp Security Library

Developers need look no farther than the newly released 9Rays.Net CryptoSharp security software in their ongoing efforts to thwart hackers. Security tools, hash functions, and ciphers have been developed and bundled in a single library. With this security software, platform-independent code provides data compression and encryption functionality to enhance the security of 32 and 64 bit environments.

When using the 9Rays.Net CryptoSharp Security Library, file based data is protected using powerful encryption. Data compression is another function which is prominent in the new release, ensuring the best in data security. Standard .NET framework classes are used throughout the CryptoSharp Security Library, which simplifies the encrypted storage of existing programs, enhancing their security. Newly created security enabled applications are protected from their inception with the latest encryption.

Copying the required component set from the 9Rays.Net CryptoSharp Security Library allows the developer the ability to transparently load the compatible components for an environment. CryptoSharp will adapt automatically to the operating system, number of cores, and hardware configuration of the environment being used, basic and multi-threaded ciphers can be loaded into the Rays CryptoSharp Security Library simultaneously and are automatically accessed by single core and multi core systems as needed. A unique key server will be provided in the general release of CryptoSharp Security Library, which will make the developer's task of managing user supplied passwords and binary keys.

Secure data security storage is assisted by cryptographic hash functions. Cryptosharp uses SHA-1, SHA-256, SHA-384, SHA-512, MD5 and other secure hash algorithms for secure data security storage. 9Rays.Net CryptoSharp's security software also includes a file shredder, which securely removes the original code from a system after it has been encrypted, by overwriting data multiple times, modifying file sizes hide their actual length, renaming them multiple times, and deleting them over and over, making detection less feasible to such an extent that the original file cannot be reconstituted.

For more information on data security and CryptoSharp's new security software, visit the Web site at http://www.9rays.net/.

Source: PRWeb

Make Your Pilgrimage to Python Bootcamp at the Big Nerd Ranch, November 5-9, 2007

Big Nerd Ranch, Inc. announced the fall dates of Python Bootcamp (http://bignerdranch.com/classes/python.shtml), scheduled for November 5-9, 2007. Python Bootcamp at the Big Nerd Ranch distinguishes itself by uniquely teaching Python as a language for Enterprise Systems Development with an emphasis on real-world applications. This includes using Python to process data, creating links between existing applications, and creating complex mission critical applications involving concurrency, network programming, and distributed systems. By drawing on instructor and Python guru David Beazley's extensive background as a Python developer and renowned author of 'Python Essential Reference,' the intensive, five-day Python training class provides a comprehensive introduction to the Python language and is designed for the software engineer interested in using Python to develop highly sophisticated, enterprise-level applications. Even developers with prior Python experience will gain from this course as Dave goes "beyond the books" to talk about modern Python programming style, program performance, program design tradeoffs, and the inner workings of core language features.

"So why Python Bootcamp at the Big Nerd Ranch?" mused Big Nerd Ranch founder, Aaron Hillegass. "In addition to all the wonderful things about Python that commend it above other languages -- its extensibility, its elegant syntax, its ability to deftly manage enterprise-level applications -- there is also the issue of ubiquity. Python popularity has reached that critical mass where the full power behind this scripting language has elevated this seemingly simple bit of coding to one of the canon languages for the enterprising developer. It is rapidly becoming the lingua franca for top-tier programmers charged with developing dynamic, richly layered, and powerful applications."

Students attending Python Bootcamp will be challenged over the course of a week as David Beazley converts the Py-curious into full-fledged Python developers. Topics include:

  • A complete introduction to Python's programming environment, interactive interpreter, core datatypes, and standard library;
  • A thorough overview of types and operators, control flow, functions, exceptions and classes;
  • How to create new Python modules;
  • Strategies for concurrent programming, including interprocess communication and programming with threads;
  • Networking programming, including sockets and modules for supporting standard Internet application protocols;
  • A detailed examination of object-oriented prorgramming in Python;
  • Cross-platform systems development and using Pythonwin to control Windows applications via COM;
  • An introduction to XML and Internet data handling;
  • An overview of SWIG

Python Bootcamp covers extensive territory, providing instruction not only in the language itself, but also in how it relates to real-world challenges like interfacing with existing applications, networking and system programming, and more. For this reason, it is strongly recommended that students attending the Python training class have previous experience with an object-oriented language like C++ or Java and a scripting language like Perl.

To learn more about Python Instructor Dave Beazley: http://bignerdranch.com/instructors/beazley.shtml

The Big Nerd Ranch incorporates intensive training classes for Unix and Mac OS X programmers and system administrators in a retreat setting outside Atlanta, GA. Class price of $3,500 includes lodging, all meals, original instruction materials, 24-hour lab access, and ground transportation to and from the Atlanta airport. Students are encouraged to bring independent projects to class, allowing for input from classmates and individual instructor attention. For more information, call 678-595-6773 or visit http://bignerdranch.com/

Source: PRWeb

Saturday, September 1, 2007

Reverse a String in Java

This tutorial shows how to reverse the contents of a string.

To reverse the contents of a string, we will use the StringBuffer class which has a reverse() method that allows us to easily reverse the contents of the string.

To start we will create a String and place that String into a StringBuffer.

//Original String
String originalString = "Hello World";

//Create a StringBuffer from the original string
StringBuffer buffer = new StringBuffer(originalString);

Next, we will call the reverse method on the StringBuffer and convert the StringBuffer back to a String.

//Reverse the contents of the StringBuffer
buffer = buffer.reverse();

//Convert the StringBuffer back to a String
String reverseString = buffer.toString();

Below is the complete code for reversing the contents of a string.

//Original String String
originalString = "Hello World";

//Create a StringBuffer from the original string
StringBuffer buffer = new StringBuffer(originalString);

//Reverse the contents of the StringBuffer
buffer = buffer.reverse();

//Convert the StringBuffer back to a String
String reverseString = buffer.toString();


//Print the original and reverse string
System.out.println("original: " + originalString);
System.out.println("reverse : " + reverseString);


Below is the output from the sample code above:
original: Hello World
reverse : dlroW olleH