Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

What is "For"?

Featured Replies

I saw "For" recently.

I know somewhat of what it means, but i don't understand why you would need to use it. Can somebody elaborate?

There are 2 types of for loops; The 'standard' for loop which loops through a code block while a condition is true, executing some logic after every loop as well (usually incrementation).

 

example:

for(int i = 0; i < 10; i++) {
//Code block
}

this would execute the code block until the variable i is no longer less than 10; And will increment i by one after each execution of the code block. This type of for loop is commonly used for iterating through arrays of primitive types, grabbing elements by index.

 

another variation of the for loop (often referred to as a for-each loop) is used to pull elements out of a collection. This type of for-loop will only work with collections that implement the Iterable interface, and is essentially a limited iteration by the collections iterator.

for(Object element : collection) {
//Do something with the elementa
}

Edited by FrostBug

The for keyword is meant to loop through an array/list

nice 1111 posts, lel

Hey, Thanks :)

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.