1,916 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for Dani

Two classes which aim to demonstrate private and public members of a class. A static variable is used as an accumulator to keep track of the number of class objects which are created.

Software Development java
Member Avatar for tunstar
0
255
Member Avatar for Dani

A program combining a switch statement with static variables in a class. Based on the switch statement, a class object is dynamically created.

Software Development java
0
210
Member Avatar for Phaelax

Nothing fancy, but I know many new programmers are often confused about recursion. Recursion simply is when a method calls itself. What MyTree does is it adds nodes to the root node, then that root node can be used to create a JTree. The populate() method reads in a list …

Software Development java
0
182
Member Avatar for johnroach1985
Member Avatar for Banderson

Here is a code to sort numbers instead of strings using the BubbleSort method. The difference here is you don't use compareTo() for numbers as you do with strings.

Software Development java
Member Avatar for alpe gulay
0
170
Member Avatar for Eddi

Hi Dani, fine Examples (the others too) to learn programming Java, but where is the MyInput.java class? Thanks Eddi

Software Development java
Member Avatar for cms271828
0
370
Member Avatar for Dani

This program consists of two functions in one class. It demonstrates a recursive function to calculate the factorial of a number.

Software Development java
Member Avatar for dharween0629
0
214
Member Avatar for Mahen

Hi everyone, I've been working on this calculator for days, and now i am making it opensource so that everyone can bring his own contribution, please comment all your codes very well.

Software Development c
0
258
Member Avatar for hivework

This tiny code will demonstrate how to log-off from windows. Enjoy!

Software Development c
Member Avatar for BountyX
0
132
Member Avatar for mister-fett

I just spent about an hour making this story builder to create book and short story outlines. It is written in C. If anyone has suggestions, please reply to this, PM or email me. Anyway, here is the code and .cpp, as well as the exe in a zip file. …

Software Development c
0
171
Member Avatar for shouvik

Have a look at this programme. it is my semister project

Software Development c++
Member Avatar for thakur ravi
0
117
Member Avatar for shouvik

Well I thought u might be bored with the hangman stuff i posted a few days ago so here is a new gaming programme. well in this one all u have to do is try to guess the number correctly while running the programme. suggestions are welcome. this is not …

Software Development c++ gaming
Member Avatar for Ghost
0
254
Member Avatar for Mostafaib

hi this is a program for simulation the scheduling in processes between RAM and CPU the program in c language and i hope that you will engoy it and i will be ready for more help

Software Development algorithm c
Member Avatar for vegaseat
0
139
Member Avatar for Asif_NSU

It's a game where u shoot from a cannon and the cannon-ball moves like a projectile and hits a target. So u will see three major things in this program: 1. Rotating a cannon; 2. How to move an object like a projectile 3. A very simple collision detection Before …

Software Development c
Member Avatar for neelam_209
0
3K
Member Avatar for meabed

hi all .. this is intorduction to an anonymous classes, An anonymous class is one that doesn't have a name. In the following example, both structures inside the TRectangle union are anonymous classes: Here is an example of running the program: You want to identify your rectangle by its location …

Software Development c++
Member Avatar for crestaldin
0
217
Member Avatar for BlackDice

I don't know if this function may be helpful to anyone, but I just converted from a VB function recently to C++. I'm converting a text file string that is nine characters to a decimal value that has funny characters in it because it is exported from an old VAX. …

Software Development c++
0
201

The End.